Fix gcc 8 warnings
This commit is contained in:
parent
5733073c33
commit
48bc6e02ba
@ -270,7 +270,7 @@ char * GameSave::Serialise(unsigned int & dataSize)
|
||||
{
|
||||
return serialiseOPS(dataSize);
|
||||
}
|
||||
catch (BuildException e)
|
||||
catch (BuildException & e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
return NULL;
|
||||
|
@ -2648,8 +2648,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim):
|
||||
renderModePresets[10].ColourMode = COLOUR_LIFE;
|
||||
|
||||
//Prepare the graphics cache
|
||||
graphicscache = (gcache_item *)malloc(sizeof(gcache_item)*PT_NUM);
|
||||
memset(graphicscache, 0, sizeof(gcache_item)*PT_NUM);
|
||||
graphicscache = new gcache_item[PT_NUM];
|
||||
std::fill(&graphicscache[0], &graphicscache[PT_NUM], gcache_item());
|
||||
|
||||
int fireColoursCount = 4;
|
||||
pixel fireColours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)};
|
||||
@ -2960,7 +2960,7 @@ Renderer::~Renderer()
|
||||
delete[] persistentVid;
|
||||
delete[] warpVid;
|
||||
#endif
|
||||
free(graphicscache);
|
||||
delete[] graphicscache;
|
||||
free(flm_data);
|
||||
free(plasma_data);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ SearchView::SearchView():
|
||||
{
|
||||
motdLabel = new ui::RichLabel(ui::Point(51, WINDOWH-18), ui::Point(WINDOWW-102, 16), Client::Ref().GetMessageOfTheDay());
|
||||
}
|
||||
catch (std::exception e) { }
|
||||
catch (std::exception & e) { }
|
||||
|
||||
class PageNumAction : public ui::TextboxAction
|
||||
{
|
||||
@ -254,7 +254,7 @@ void SearchView::NotifyMessageOfTheDay(Client * sender)
|
||||
{
|
||||
motdLabel->SetText(sender->GetMessageOfTheDay());
|
||||
}
|
||||
catch (std::exception e)
|
||||
catch (std::exception & e)
|
||||
{
|
||||
motdLabel = nullptr;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ int luacon_elementwrite(lua_State* l)
|
||||
|
||||
luacon_model->BuildMenus();
|
||||
luacon_sim->init_can_move();
|
||||
memset(luacon_ren->graphicscache, 0, sizeof(gcache_item)*PT_NUM);
|
||||
std::fill(&luacon_ren->graphicscache[0], &luacon_ren->graphicscache[PT_NUM], gcache_item());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure
|
||||
{
|
||||
save->Expand();
|
||||
}
|
||||
catch (ParseException)
|
||||
catch (ParseException &)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user