/* SimGrid Lua bindings */
-#include "lua_private.h"
+#include "lua_private.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
#include <lauxlib.h>
}
-#include "src/surf/surf_private.h"
+#include "src/surf/surf_private.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <simgrid/s4u/Host.hpp>
lua_pop(L, 1);
lua_pushstring(L, "sharing_policy");
- type = lua_gettable(L, -2);
+ lua_gettable(L, -2);
const char* policy = lua_tostring(L, -1);
+ lua_pop(L, 1);
if (policy && not strcmp(policy, "FULLDUPLEX")) {
link.policy = SURF_LINK_FULLDUPLEX;
} else if (policy && not strcmp(policy, "FATPIPE")) {
hostlink.link_down = lua_tostring(L, -1);
lua_pop(L, 1);
- XBT_DEBUG("Create a host_link for host %s", hostlink.id);
+ XBT_DEBUG("Create a host_link for host %s", hostlink.id.c_str());
sg_platf_new_hostlink(&hostlink);
return 0;
route.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1)));
} else {
// Several names separated by , \t\r\n
- for (auto name : names) {
+ for (auto const& name : names) {
if (name.length() > 0) {
simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name);
route.link_list->push_back(link);
ASroute.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1)));
} else {
// Several names separated by , \t\r\n
- for (auto name : names) {
+ for (auto const& name : names) {
if (name.length() > 0) {
simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name);
ASroute.link_list->push_back(link);