代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gz-math 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。