mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Silence a lot of warnings
This commit is contained in:
parent
f3151fe0b7
commit
a574649dce
@ -314,6 +314,8 @@ private:
|
||||
// Set state
|
||||
void setBlend(bool enable)
|
||||
{
|
||||
RW_UNUSED(enable);
|
||||
|
||||
/// @todo set blendEnabled, currently not possible because other functions keep trashing the state
|
||||
#if 0
|
||||
if (enable && !blendEnabled) {
|
||||
|
@ -166,7 +166,7 @@ void game_create_vehicle_generator(const ScriptArguments& args)
|
||||
void game_set_vehicle_generator_count(const ScriptArguments& args)
|
||||
{
|
||||
RW_CHECK(args.getWorld()->state->vehicleGenerators.size() > *args[0].globalInteger, "VehicleGenerator out of range");
|
||||
if (args.getWorld()->state->vehicleGenerators.size() > *args[0].globalInteger) {
|
||||
if ((int)args.getWorld()->state->vehicleGenerators.size() > *args[0].globalInteger) {
|
||||
VehicleGenerator& generator = args.getWorld()->state->vehicleGenerators.at(*args[0].globalInteger);
|
||||
generator.remainingSpawns = args[1].integer;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ void drawPlayerInfo(PlayerController* player, GameWorld* world, GameRenderer* re
|
||||
}
|
||||
|
||||
std::string s;
|
||||
for (int i = 0; i < ui_maxWantedLevel; ++i) {
|
||||
for (size_t i = 0; i < ui_maxWantedLevel; ++i) {
|
||||
s += "]";
|
||||
}
|
||||
ti.text = s;
|
||||
|
@ -232,7 +232,7 @@ void RWGame::newGame()
|
||||
|
||||
void RWGame::saveGame(const std::string& savename)
|
||||
{
|
||||
|
||||
RW_UNUSED(savename);
|
||||
}
|
||||
|
||||
void RWGame::loadGame(const std::string& savename)
|
||||
@ -290,7 +290,7 @@ void RWGame::startScript(const std::string& name)
|
||||
std::stringstream ss;
|
||||
ss << " " << bp.function->description << ".";
|
||||
ss << " Args:";
|
||||
for(int a = 0; a < bp.args->getParameters().size(); a++)
|
||||
for(size_t a = 0; a < bp.args->getParameters().size(); a++)
|
||||
{
|
||||
auto& arg = bp.args->getParameters()[a];
|
||||
ss << " " << arg.integerValue();
|
||||
@ -457,7 +457,7 @@ void RWGame::tick(float dt)
|
||||
}
|
||||
|
||||
// Clean up old VisualFX
|
||||
for( int i = 0; i < world->effects.size(); ++i )
|
||||
for( ssize_t i = 0; i < static_cast<ssize_t>(world->effects.size()); ++i )
|
||||
{
|
||||
VisualFX* effect = world->effects[i];
|
||||
if( effect->getType() == VisualFX::Particle )
|
||||
@ -624,7 +624,7 @@ void RWGame::renderDebugStats(float time, Renderer::ProfileInfo& worldRenderTime
|
||||
times_index = 0;
|
||||
time_average = 0;
|
||||
|
||||
for (int i = 0; i < average_every_frame; ++i) {
|
||||
for (size_t i = 0; i < average_every_frame; ++i) {
|
||||
time_average += times[i];
|
||||
}
|
||||
time_average /= average_every_frame;
|
||||
@ -718,6 +718,8 @@ void RWGame::renderDebugStats(float time, Renderer::ProfileInfo& worldRenderTime
|
||||
|
||||
void RWGame::renderDebugPaths(float time)
|
||||
{
|
||||
RW_UNUSED(time);
|
||||
|
||||
btVector3 roadColour(1.f, 0.f, 0.f);
|
||||
btVector3 pedColour(0.f, 0.f, 1.f);
|
||||
|
||||
|
@ -27,12 +27,12 @@ class RWGame
|
||||
// must be allocated after Logger setup.
|
||||
GameRenderer* renderer;
|
||||
ScriptMachine* script;
|
||||
GameWindow *window;
|
||||
// Background worker
|
||||
WorkContext *work;
|
||||
bool debugScript;
|
||||
HttpServer* httpserver = nullptr;
|
||||
std::thread* httpserver_thread = nullptr;
|
||||
GameWindow *window;
|
||||
std::chrono::steady_clock clock;
|
||||
std::chrono::steady_clock::time_point last_clock_time;
|
||||
|
||||
|
@ -320,8 +320,10 @@ std::string HttpServer::getState() const
|
||||
}
|
||||
}
|
||||
|
||||
std::string HttpServer::dispatch(std::string method, std::string path)
|
||||
std::string HttpServer::dispatch(const std::string& method, const std::string& path)
|
||||
{
|
||||
RW_UNUSED(method);
|
||||
|
||||
std::stringstream ss;
|
||||
std::string mime = "text/html";
|
||||
if(path == "/debugger.js") {
|
||||
|
@ -19,6 +19,6 @@ private:
|
||||
bool paused;
|
||||
const SCMBreakpoint* lastBreakpoint;
|
||||
|
||||
std::string dispatch(std::string method, std::string path);
|
||||
std::string dispatch(const std::string& method, const std::string& path);
|
||||
std::string getState() const;
|
||||
};
|
||||
|
@ -74,7 +74,6 @@ void TcpSocket::disconnect()
|
||||
|
||||
char* TcpSocket::getRemoteAddress() const
|
||||
{
|
||||
char buffer[INET_ADDRSTRLEN+1] = { };
|
||||
return inet_ntoa(addr.sin_addr);
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,6 @@ IngameState::IngameState(RWGame* game, bool newgame, const std::string& save)
|
||||
void IngameState::startTest()
|
||||
{
|
||||
auto playerChar = getWorld()->createPlayer({270.f, -605.f, 40.f});
|
||||
auto player = new PlayerController(playerChar);
|
||||
|
||||
getWorld()->state->playerObject = playerChar->getGameObjectID();
|
||||
|
||||
|
@ -26,6 +26,8 @@ void LoadingState::exit()
|
||||
|
||||
void LoadingState::tick(float dt)
|
||||
{
|
||||
RW_UNUSED(dt);
|
||||
|
||||
// If background work is completed, switch to the next state
|
||||
if( getWorld()->_work->isEmpty() ) {
|
||||
StateManager::get().exec(next);
|
||||
|
@ -59,7 +59,7 @@ void MenuState::exit()
|
||||
|
||||
void MenuState::tick(float dt)
|
||||
{
|
||||
|
||||
RW_UNUSED(dt);
|
||||
}
|
||||
|
||||
void MenuState::handleEvent(const SDL_Event& e)
|
||||
|
@ -28,7 +28,7 @@ void PauseState::exit()
|
||||
|
||||
void PauseState::tick(float dt)
|
||||
{
|
||||
|
||||
RW_UNUSED(dt);
|
||||
}
|
||||
|
||||
void PauseState::draw(GameRenderer* r)
|
||||
|
Loading…
Reference in New Issue
Block a user