Skip to content

Commit

Permalink
Warning Resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
AkrionXxarr committed Feb 28, 2013
1 parent a5fa8f9 commit 55b8e3a
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 153 deletions.
4 changes: 4 additions & 0 deletions action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ std::string action_ident(action_id act)
return "debug_mode";
case ACTION_NULL:
return "null";
case NUM_ACTIONS:
// Unused. Added for completeness.
}
return "unknown";
}
Expand Down Expand Up @@ -389,6 +391,8 @@ std::string action_name(action_id act)
return "Toggle Debug Messages";
case ACTION_NULL:
return "No Action";
case NUM_ACTIONS:
// Unused. Added for completeness.
}
return "Someone forgot to name an action.";
}
12 changes: 6 additions & 6 deletions gamemode.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ struct special_game
{
virtual special_game_id id() { return SGAME_NULL; };
// init is run when the game begins
virtual bool init(game *g) { return true; };
virtual bool init(game *) { return true; };
// per_turn is run every turn--before any player actions
virtual void per_turn(game *g) { };
virtual void per_turn(game *) { };
// pre_action is run after a keypress, but before the game handles the action
// It may modify the action, e.g. to cancel it
virtual void pre_action(game *g, action_id &act) { };
virtual void pre_action(game *, action_id &) { };
// post_action is run after the game handles the action
virtual void post_action(game *g, action_id act) { };
virtual void post_action(game *, action_id) { };
// game_over is run when the player dies (or the game otherwise ends)
virtual void game_over(game *g) { };
virtual void game_over(game *) { };

};

Expand Down Expand Up @@ -71,7 +71,7 @@ struct tutorial_game : public special_game
virtual void per_turn(game *g);
virtual void pre_action(game *g, action_id &act);
virtual void post_action(game *g, action_id act);
virtual void game_over(game *g) { };
virtual void game_over(game *) { };

private:
void add_message(game *g, tut_lesson lesson);
Expand Down
10 changes: 5 additions & 5 deletions itype.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ struct it_var_veh_part: public itype
char psym, nc_color pcolor, material pm1, material pm2,
unsigned short pvolume, unsigned short pweight,
signed char pmelee_dam, signed char pmelee_cut, signed char pm_to_hit,
unsigned effects,
unsigned,

unsigned int big_min,
unsigned int big_max,
Expand Down Expand Up @@ -966,15 +966,15 @@ struct it_artifact_tool : public it_tool
" " << int(m_to_hit) << " " << int(item_flags) << " " <<
int(charge_type) << " " << max_charges << " " <<
effects_wielded.size();
for (int i = 0; i < effects_wielded.size(); i++)
for (unsigned int i = 0; i < effects_wielded.size(); i++)
data << " " << int(effects_wielded[i]);

data << " " << effects_activated.size();
for (int i = 0; i < effects_activated.size(); i++)
for (unsigned int i = 0; i < effects_activated.size(); i++)
data << " " << int(effects_activated[i]);

data << " " << effects_carried.size();
for (int i = 0; i < effects_carried.size(); i++)
for (unsigned int i = 0; i < effects_carried.size(); i++)
data << " " << int(effects_carried[i]);

data << " " << name << " - ";
Expand Down Expand Up @@ -1026,7 +1026,7 @@ struct it_artifact_armor : public it_armor
int(covers) << " " << int(encumber) << " " << int(dmg_resist) <<
" " << int(cut_resist) << " " << int(env_resist) << " " <<
int(warmth) << " " << int(storage) << " " << effects_worn.size();
for (int i = 0; i < effects_worn.size(); i++)
for (unsigned int i = 0; i < effects_worn.size(); i++)
data << " " << int(effects_worn[i]);

data << " " << name << " - ";
Expand Down
2 changes: 1 addition & 1 deletion iuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class player;
class iuse
{
public:
void none (game *g, player *p, item *it, bool t) { };
void none (game *, player *, item *, bool ) { };

// FOOD AND DRUGS (ADMINISTRATION)
void sewage (game *g, player *p, item *it, bool t);
Expand Down
4 changes: 2 additions & 2 deletions mission.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ enum mission_goal {
};

struct mission_place { // Return true if [posx,posy] is valid in overmap
bool never (game *g, int posx, int posy) { return false; }
bool always (game *g, int posx, int posy) { return true; }
bool never (game *, int, int) { return false; }
bool always (game *, int, int) { return true; }
bool near_town (game *g, int posx, int posy);
};

Expand Down
2 changes: 1 addition & 1 deletion monattack.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class game;
class mattack
{
public:
void none (game *g, monster *z) { };
void none (game *, monster *) { };
void antqueen (game *g, monster *z);
void shriek (game *g, monster *z);
void acid (game *g, monster *z);
Expand Down
2 changes: 1 addition & 1 deletion mtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ struct mtype {

bool has_flag(m_flag flag)
{
for (int i = 0; i < flags.size(); i++) {
for (unsigned int i = 0; i < flags.size(); i++) {
if (flags[i] == flag)
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions npc.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ struct npc_opinion
anger = copy.anger;
owed = copy.owed;
favors.clear();
for (int i = 0; i < copy.favors.size(); i++)
for (unsigned int i = 0; i < copy.favors.size(); i++)
favors.push_back( copy.favors[i] );
};

Expand Down Expand Up @@ -220,7 +220,7 @@ struct npc_opinion
std::stringstream ret;
ret << trust << " " << fear << " " << value << " " << anger << " " << owed <<
" " << favors.size();
for (int i = 0; i < favors.size(); i++)
for (unsigned int i = 0; i < favors.size(); i++)
ret << " " << int(favors[i].type) << " " << favors[i].value << " " <<
favors[i].item_id << " " << favors[i].skill->id();
return ret.str();
Expand Down Expand Up @@ -363,9 +363,9 @@ struct npc_chatbin
std::stringstream ret;
ret << first_topic << " " << mission_selected << " " << tempvalue << " " <<
missions.size() << " " << missions_assigned.size();
for (int i = 0; i < missions.size(); i++)
for (unsigned int i = 0; i < missions.size(); i++)
ret << " " << missions[i];
for (int i = 0; i < missions_assigned.size(); i++)
for (unsigned int i = 0; i < missions_assigned.size(); i++)
ret << " " << missions_assigned[i];
return ret.str();
}
Expand Down
4 changes: 2 additions & 2 deletions omdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ NUM_OMS_FLAGS
struct omspec_place
{
// Able functions - true if p is valid
bool never (overmap *om, point p) { return false; }
bool always (overmap *om, point p) { return true; }
bool never (overmap *, point) { return false; }
bool always (overmap *, point) { return true; }
bool water (overmap *om, point p); // Only on rivers
bool land (overmap *om, point p); // Only on land (no rivers)
bool forest (overmap *om, point p); // Forest
Expand Down
4 changes: 2 additions & 2 deletions pldata.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct player_activity
index = copy.index;
placement = copy.placement;
values.clear();
for (int i = 0; i < copy.values.size(); i++)
for (unsigned int i = 0; i < copy.values.size(); i++)
values.push_back(copy.values[i]);
}

Expand All @@ -137,7 +137,7 @@ struct player_activity
std::stringstream ret;
ret << type << " " << moves_left << " " << index << " " << placement.x <<
" " << placement.y << " " << values.size();
for (int i = 0; i < values.size(); i++)
for (unsigned int i = 0; i < values.size(); i++)
ret << " " << values[i];

return ret.str();
Expand Down
2 changes: 1 addition & 1 deletion settlement.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct settlement {
settlement(int mapx, int mapy);
void pick_faction(game *g, int omx, int omy);
void set_population();
void populate(game *g) { };
void populate(game *) { };

int num(oter_id ter);
void add_building(oter_id ter);
Expand Down
14 changes: 7 additions & 7 deletions trap.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ enum trap_id {
struct trap;

struct trapfunc {
void none (game *g, int x, int y) { };
void none (game *, int, int) { };
void bubble (game *g, int x, int y);
void beartrap (game *g, int x, int y);
void snare (game *g, int x, int y) { };
void snare (game *, int, int) { };
void board (game *g, int x, int y);
void tripwire (game *g, int x, int y);
void crossbow (game *g, int x, int y);
Expand All @@ -63,7 +63,7 @@ struct trapfunc {
void pit (game *g, int x, int y);
void pit_spikes (game *g, int x, int y);
void lava (game *g, int x, int y);
void portal (game *g, int x, int y) { };
void portal (game *, int, int) { };
void ledge (game *g, int x, int y);
void boobytrap (game *g, int x, int y);
void temple_flood (game *g, int x, int y);
Expand All @@ -76,7 +76,7 @@ struct trapfunc {
};

struct trapfuncm {
void none (game *g, monster *z, int x, int y) { };
void none (game *, monster *, int , int) { };
void bubble (game *g, monster *z, int x, int y);
void cot (game *g, monster *z, int x, int y);
void beartrap (game *g, monster *z, int x, int y);
Expand All @@ -85,16 +85,16 @@ struct trapfuncm {
void crossbow (game *g, monster *z, int x, int y);
void shotgun (game *g, monster *z, int x, int y);
void blade (game *g, monster *z, int x, int y);
void snare (game *g, monster *z, int x, int y) { };
void snare (game *, monster *, int, int) { };
void landmine (game *g, monster *z, int x, int y);
void telepad (game *g, monster *z, int x, int y);
void goo (game *g, monster *z, int x, int y);
void dissector (game *g, monster *z, int x, int y);
void sinkhole (game *g, monster *z, int x, int y) { };
void sinkhole (game *, monster *, int, int) { };
void pit (game *g, monster *z, int x, int y);
void pit_spikes(game *g, monster *z, int x, int y);
void lava (game *g, monster *z, int x, int y);
void portal (game *g, monster *z, int x, int y) { };
void portal (game *, monster *, int, int) { };
void ledge (game *g, monster *z, int x, int y);
void boobytrap (game *g, monster *z, int x, int y);
void glow (game *g, monster *z, int x, int y);
Expand Down
Loading

0 comments on commit 55b8e3a

Please sign in to comment.