diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-03-01 22:46:13 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-03-01 22:46:13 +0100 |
commit | 19fc81c988af048c90ffcc4109c4264da128f978 (patch) | |
tree | ca97305c1fdf7100775b6168f0ca04be41ced4a5 | |
parent | 535848aeafba48cf7c3729fb2e5f15f12acf123a (diff) |
Fix warnings; array -> pair
-rw-r--r-- | main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -219,7 +219,7 @@ int main(int argc,char **argv){ vector<Team> teams; bool opt_pos = false; - vector<array<int,2>> positions; // TODO: use pair? + vector<pair<int,int>> positions; int k = 1; // Increase past options; @@ -233,14 +233,14 @@ int main(int argc,char **argv){ assert(f); teams.push_back(assemble(preprocess(f))); if(opt_pos) { - positions.push_back({(int)strtol(argv[i+1],NULL,10), (int)strtol(argv[i+2],NULL,10)}); // TODO: check if i>argc + positions.emplace_back((int)strtol(argv[i+1],NULL,10), (int)strtol(argv[i+2],NULL,10)); // TODO: check if i>argc i += 2; } } - for(int i=0; i<teams.size(); i++) { + for(int i=0; i<(int)teams.size(); i++) { const Team &t = teams[i]; - Robot &r = opt_pos ? world.create(&t,2,t.banks.size(),false, positions[i][0], positions[i][1]) + Robot &r = opt_pos ? world.create(&t,2,t.banks.size(),false, positions[i].first, positions[i].second) : world.create(&t,2,t.banks.size(),false); for(int i=0;i<(int)t.banks.size();i++){ |