diff options
| author | Quietust | 2012-01-31 10:55:38 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-31 10:55:38 -0600 |
| commit | 9afcea3debd7588e897eea21b33b8a86e9adcc4d (patch) | |
| tree | 3db1c6e2a1613eef4d8ebac243b5353e18db654b /plugins/showmood.cpp | |
| parent | a82f4c913803038d20b4c92e65b53f9fea9555dc (diff) | |
| download | dfhack-9afcea3debd7588e897eea21b33b8a86e9adcc4d.tar.gz dfhack-9afcea3debd7588e897eea21b33b8a86e9adcc4d.tar.bz2 dfhack-9afcea3debd7588e897eea21b33b8a86e9adcc4d.tar.xz | |
In all loops that iterate across a vector, use a size_t as the index
Diffstat (limited to 'plugins/showmood.cpp')
| -rw-r--r-- | plugins/showmood.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/showmood.cpp b/plugins/showmood.cpp index 834d9ded..6f677a4c 100644 --- a/plugins/showmood.cpp +++ b/plugins/showmood.cpp @@ -49,7 +49,7 @@ DFhackCExport command_result df_showmood (Core * c, vector <string> & parameters found = true; df::unit *unit = NULL; df::building *building = NULL; - for (int i = 0; i < job->references.size(); i++) + for (size_t i = 0; i < job->references.size(); i++) { df::general_ref *ref = job->references[i]; if (ref->getType() == general_ref_type::UNIT_WORKER) @@ -155,7 +155,7 @@ DFhackCExport command_result df_showmood (Core * c, vector <string> & parameters else c->con.print(" and has not yet claimed a workshop\n"); - for (int i = 0; i < job->job_items.size(); i++) + for (size_t i = 0; i < job->job_items.size(); i++) { df::job_item *item = job->job_items[i]; c->con.print("Item %i: ", i + 1); |
