arduino / arduino/ArduinoCore-API

Why not using abs() from stdlib?

未关闭
#82 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
306
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

Why does Arduino.h use its own abs() if stdlib has this already builtin. This causes me problems in build environments. I dont see any reason why one would prefer an Arduino definition. Can we get rid of it?
```
#define abs(x) ((x)>0?(x):-(x))
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先阅读 Arduino.h,并定位 issue 中所示的本地 abs(x) 宏。检查标准库和受影响的构建环境如何解析 abs,然后验证移除 Arduino 定义不会破坏现有的 Arduino API 构建或依赖它的用户。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
api, embedded-iot
Issue 类型
重构
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。