Author: zaroth
Date: Thu Jun 9 11:53:24 2011
New Revision: 49824
URL: http://svn.gna.org/viewcvs/wesnoth?rev=49824&view=rev
Log:
got rid of argc and argv from game_controller class - they're redundant
now.
Modified:
trunk/src/game.cpp
trunk/src/game_controller.cpp
trunk/src/game_controller.hpp
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=49824&r1=49823&r2=49824&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Thu Jun 9 11:53:24 2011
@@ -419,7 +419,7 @@
if (game_config::new_syntax)
game = boost::shared_ptr<game_controller_abstract>(new
game_controller_new());
else
- game = boost::shared_ptr<game_controller_abstract>(new
game_controller(argc,argv,cmdline_opts));
+ game = boost::shared_ptr<game_controller_abstract>(new
game_controller(argv[0],cmdline_opts));
const int start_ticks = SDL_GetTicks();
init_locale();
Modified: trunk/src/game_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_controller.cpp?rev=49824&r1=49823&r2=49824&view=diff
==============================================================================
--- trunk/src/game_controller.cpp (original)
+++ trunk/src/game_controller.cpp Thu Jun 9 11:53:24 2011
@@ -66,10 +66,7 @@
return a["rank"].to_int(1000) < b["rank"].to_int(1000);
}
-game_controller::game_controller(int argc, char** argv, const
commandline_options& cmdline_opts) :
- argc_(argc),
- arg_(1),
- argv_(argv),
+game_controller::game_controller(const char *appname, const
commandline_options& cmdline_opts) :
cmdline_opts_(cmdline_opts),
thread_manager(),
font_manager_(),
@@ -114,7 +111,7 @@
font_manager_.update_font_path();
}
- const std::string app_basename = file_name(argv[0]);
+ const std::string app_basename = file_name(appname);
jump_to_editor_ = app_basename.find("editor") != std::string::npos;
if (cmdline_opts_.bpp)
@@ -167,7 +164,7 @@
if (cmdline_opts_.max_fps) {
int fps;
//FIXME: remove the next line once the weird util.cpp
specialized template lexical_cast_default() linking issue is solved
- fps = lexical_cast_default<int>(argv_[arg_], 50);
+ fps = lexical_cast_default<int>("", 50);
fps = *cmdline_opts_.max_fps;
fps = std::min<int>(fps, 1000);
fps = std::max<int>(fps, 1);
Modified: trunk/src/game_controller.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_controller.hpp?rev=49824&r1=49823&r2=49824&view=diff
==============================================================================
--- trunk/src/game_controller.hpp (original)
+++ trunk/src/game_controller.hpp Thu Jun 9 11:53:24 2011
@@ -46,7 +46,7 @@
class game_controller : public game_controller_abstract
{
public:
- game_controller(int argc, char** argv, const commandline_options&
cmdline_opts);
+ game_controller(const char* appname, const commandline_options&
cmdline_opts);
~game_controller();
bool init_config() { return init_config(false); }
@@ -94,9 +94,6 @@
editor::EXIT_STATUS start_editor(const std::string& filename);
- const int argc_;
- int arg_;
- const char* const * const argv_;
const commandline_options& cmdline_opts_;
//this should get destroyed *after* the video, since we want
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits