Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 8, 2014
2 parents 39c8aab + 6f0fbc5 commit 49a7d0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
10 changes: 3 additions & 7 deletions src/config_cache.cpp
Expand Up @@ -146,13 +146,9 @@ namespace game_config {

void config_cache::read_configs(const std::string& path, config& cfg, preproc_map& defines_map)
{
try {
//read the file and then write to the cache
scoped_istream stream = preprocess_file(path, &defines_map);
read(cfg, *stream);
} catch (config::error & e) {
ERR_CACHE << "error parsing configs in '" << path << "', got config::error\n" << e.message << std::endl;
}
//read the file and then write to the cache
scoped_istream stream = preprocess_file(path, &defines_map);
read(cfg, *stream);
}

void config_cache::read_cache(const std::string& path, config& cfg)
Expand Down
10 changes: 0 additions & 10 deletions src/savegame.hpp
Expand Up @@ -61,16 +61,6 @@ class loadgame
bool show_replay() const { return show_replay_; }
bool cancel_orders() const { return cancel_orders_; }
const std::string & filename() const { return filename_; }

std::string get_difficulty() const
{ return load_config_["difficulty"].empty() ? DEFAULT_DIFFICULTY : load_config_["difficulty"].str(); }
/*
{ if ( const config & carryover = load_config_.child("carryover_sides_start") )
return carryover["difficulty"];
else
return DEFAULT_DIFFICULTY;
}
*/
private:
/** Display the load-game dialog. */
void show_dialog(bool show_replay, bool cancel_orders);
Expand Down
4 changes: 2 additions & 2 deletions src/synced_commands.cpp
Expand Up @@ -177,7 +177,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(attack, child, /*use_undo*/, show, error_handler
if (child.has_attribute("attacker_type")) {
const std::string &att_type_id = child["attacker_type"];
if (u->type_id() != att_type_id) {
WRN_REPLAY << "unexpected attacker type: " << att_type_id << "(game_state gives: " << u->type_id() << ")" << std::endl;
WRN_REPLAY << "unexpected attacker type: " << att_type_id << "(game state gives: " << u->type_id() << ")" << std::endl;
}
}

Expand All @@ -198,7 +198,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(attack, child, /*use_undo*/, show, error_handler
if (child.has_attribute("defender_type")) {
const std::string &def_type_id = child["defender_type"];
if (tgt->type_id() != def_type_id) {
WRN_REPLAY << "unexpected defender type: " << def_type_id << "(game_state gives: " << tgt->type_id() << ")" << std::endl;
WRN_REPLAY << "unexpected defender type: " << def_type_id << "(game state gives: " << tgt->type_id() << ")" << std::endl;
}
}

Expand Down

0 comments on commit 49a7d0b

Please sign in to comment.