Update code style to C++11
parent
b41a2e9ba2
commit
107081988e
|
@ -269,7 +269,7 @@ public:
|
|||
{
|
||||
try{
|
||||
return m_con.GetPeerAvgRTT(PEER_ID_SERVER);
|
||||
} catch(con::PeerNotFoundException){
|
||||
} catch(con::PeerNotFoundException &){
|
||||
return 1337;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1215,7 +1215,7 @@ bool Connection::checkIncomingBuffers(Channel *channel, u16 &peer_id,
|
|||
break;
|
||||
}
|
||||
// This happens if all packets are old
|
||||
}catch(con::NotFoundException)
|
||||
}catch(con::NotFoundException &)
|
||||
{}
|
||||
|
||||
if(channel->incoming_reliables.empty() == false)
|
||||
|
|
|
@ -28,7 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
// Get a dependency-sorted list of ModSpecs
|
||||
core::list<ModSpec> getMods(core::list<std::string> &modspaths)
|
||||
throw(ModError)
|
||||
{
|
||||
std::queue<ModSpec> mods_satisfied;
|
||||
core::list<ModSpec> mods_unsorted;
|
||||
|
|
|
@ -59,8 +59,7 @@ struct ModSpec
|
|||
};
|
||||
|
||||
// Get a dependency-sorted list of ModSpecs
|
||||
core::list<ModSpec> getMods(core::list<std::string> &modspaths)
|
||||
throw(ModError);
|
||||
core::list<ModSpec> getMods(core::list<std::string> &modspaths);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -139,14 +139,14 @@ static Server* get_server(lua_State *L)
|
|||
return server;
|
||||
}
|
||||
|
||||
static ServerEnvironment* get_env(lua_State *L)
|
||||
/*static ServerEnvironment* get_env(lua_State *L)
|
||||
{
|
||||
// Get environment from registry
|
||||
lua_getfield(L, LUA_REGISTRYINDEX, "minetest_env");
|
||||
ServerEnvironment *env = (ServerEnvironment*)lua_touserdata(L, -1);
|
||||
lua_pop(L, 1);
|
||||
return env;
|
||||
}
|
||||
}*/
|
||||
|
||||
static void objectref_get(lua_State *L, u16 id)
|
||||
{
|
||||
|
|
|
@ -265,7 +265,7 @@ void cmd_banunban(std::wostringstream &os, ServerCommandContext *ctx)
|
|||
|
||||
actionstream<<ctx->player->getName()<<" bans "
|
||||
<<player->getName()<<" / "<<ip_string<<std::endl;
|
||||
} catch(con::PeerNotFoundException){
|
||||
} catch(con::PeerNotFoundException &){
|
||||
dstream<<__FUNCTION_NAME<<": peer was not found"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue