加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ignition-math-6.9.2-gcc12.patch 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
davidhan008 提交于 2024-01-09 13:57 . update ignition math 6.9.2
diff -up ./src/MaterialType.hh.gcc12 ./src/MaterialType.hh
--- ./src/MaterialType.hh.gcc12 2022-01-24 21:27:24.132627129 -0500
+++ ./src/MaterialType.hh 2022-01-24 21:28:18.264899715 -0500
@@ -37,20 +37,22 @@ struct MaterialData
// The mapping of material type to name and density values.
// If you modify this map, make sure to also modify the MaterialType enum in
// include/ignition/math/MaterialTypes.hh
-static std::map<MaterialType, MaterialData> kMaterialData =
-{{
- {MaterialType::STYROFOAM, {"styrofoam", 75.0}},
- {MaterialType::PINE, {"pine", 373.0}},
- {MaterialType::WOOD, {"wood", 700.0}},
- {MaterialType::OAK, {"oak", 710.0}},
- {MaterialType::PLASTIC, {"plastic", 1175.0}},
- {MaterialType::CONCRETE, {"concrete", 2000.0}},
- {MaterialType::ALUMINUM, {"aluminum", 2700.0}},
- {MaterialType::STEEL_ALLOY, {"steel_alloy", 7600.0}},
- {MaterialType::STEEL_STAINLESS, {"steel_stainless", 7800.0}},
- {MaterialType::IRON, {"iron", 7870.0}},
- {MaterialType::BRASS, {"brass", 8600.0}},
- {MaterialType::COPPER, {"copper", 8940.0}},
- {MaterialType::TUNGSTEN, {"tungsten", 19300.0}}
-}};
+static std::map<MaterialType, MaterialData> kMaterialData = []()
+{
+ std::map<MaterialType, MaterialData> ret;
+ ret[MaterialType::STYROFOAM] = {"styrofoam", 75.0};
+ ret[MaterialType::PINE] = {"pine", 373.0};
+ ret[MaterialType::WOOD] = {"wood", 700.0};
+ ret[MaterialType::OAK] = {"oak", 710.0};
+ ret[MaterialType::PLASTIC] = {"plastic", 1175.0};
+ ret[MaterialType::CONCRETE] = {"concrete", 2000.0};
+ ret[MaterialType::ALUMINUM] = {"aluminum", 2700.0};
+ ret[MaterialType::STEEL_ALLOY] = {"steel_alloy", 7600.0};
+ ret[MaterialType::STEEL_STAINLESS] = {"steel_stainless", 7800.0};
+ ret[MaterialType::IRON] = {"iron", 7870.0};
+ ret[MaterialType::BRASS] = {"brass", 8600.0};
+ ret[MaterialType::COPPER] = {"copper", 8940.0};
+ ret[MaterialType::TUNGSTEN] = {"tungsten", 19300.0};
+ return ret;
+}();
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化