修复:编译告警(格式串不匹配、非 void 函数缺返回值、C++17 结构化绑定)
- 修复 LOG_F 格式串与参数类型/数量不匹配(udpComm.h、uPlan_taskStart.h、httpserver.cpp、PowerManagerFsm.cpp、WaterBasedReady.cpp、LowerCommManager.cpp) - httpserver.cpp 中 mg_connection::fd 为 void*,打印时强转为 int - uExternComm_setOpCondition.h / uPower_sysState.h 补齐返回值,消除 -Wreturn-type - driver.cpp 移除结构化绑定(C++17),保持 -std=c++11 - PowerManagerFsm.hpp 为 class Lifting 补充 react(DevCmdExt) 声明,消除死代码编译错误
This commit is contained in:
@@ -929,7 +929,9 @@ vector<DriverCommand> Driver::loadDriverIdFromJson(const std::string &strJson) {
|
||||
{"launchControler_uint8", 37}, {"sideSonar_uint8", 35}, {"buoyage_uint8", 56}
|
||||
};
|
||||
|
||||
for (const auto& [field, id] : fieldToId) {
|
||||
for (const auto& entry : fieldToId) {
|
||||
const std::string& field = entry.first;
|
||||
int id = entry.second;
|
||||
if (root.isMember(field)) {
|
||||
unsigned char newValue = root[field].asUInt();
|
||||
DriverCommand cmd;
|
||||
|
||||
Reference in New Issue
Block a user