]> AND Public Git Repository - simgrid.git/blobdiff - src/bindings/lua/lua_platf.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with "auto" (src/mc/).
[simgrid.git] / src / bindings / lua / lua_platf.cpp
index b29dcde512b9ec7901fea5c784966a4a55c74ec7..b10982d41d53c290111d4c3f3a588ef9b4dd769b 100644 (file)
@@ -499,8 +499,8 @@ int console_AS_open(lua_State *L) {
 
  /* Build a Lua representation of the new AS on the stack */
  lua_newtable(L);
simgrid::kernel::routing::NetZoneImpl** lua_as = (simgrid::kernel::routing::NetZoneImpl**)lua_newuserdata(
-     L, sizeof(simgrid::kernel::routing::NetZoneImpl*)); /* table userdatum */
auto* lua_as = static_cast<simgrid::kernel::routing::NetZoneImpl**>(
+     lua_newuserdata(L, sizeof(simgrid::kernel::routing::NetZoneImpl*))); /* table userdatum */
  *lua_as = new_as;
  luaL_getmetatable(L, PLATF_MODULE_NAME); /* table userdatum metatable */
  lua_setmetatable(L, -2);                 /* table userdatum */