mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 08:43:48 +00:00
Out-of-line a function to remove an include
This commit is contained in:
parent
826c28b87c
commit
f8ecc545a2
@ -40,6 +40,7 @@
|
||||
#include "units/filter.hpp"
|
||||
#include "units/map.hpp"
|
||||
#include "units/types.hpp"
|
||||
#include "units/unit.hpp"
|
||||
#include "variable.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
|
||||
@ -103,6 +104,20 @@ const static double COMBAT_CACHE_TOLERANCY = 0.5;
|
||||
const static double VILLAGE_PER_SCOUT_MULTIPLICATOR = 2.;
|
||||
}
|
||||
|
||||
std::string data::to_string() const {
|
||||
std::stringstream s;
|
||||
s << "---------------Content of leader data---------------\n";
|
||||
s << "For leader: " << leader->name() << "\n";
|
||||
s << "ratio_score: " << ratio_score << "\n";
|
||||
s << "recruit_count: " << recruit_count << "\n\n";
|
||||
for (const score_map::value_type& entry : scores) {
|
||||
s << std::setw(20) << entry.first <<
|
||||
" score: " << std::setw(7) << entry.second << "\n";
|
||||
}
|
||||
s << "----------------------------------------------------\n";
|
||||
return s.str();
|
||||
}
|
||||
|
||||
recruitment::recruitment(rca_context& context, const config& cfg)
|
||||
: candidate_action(context, cfg),
|
||||
important_hexes_(),
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ai/composite/aspect.hpp"
|
||||
#include "ai/composite/rca.hpp"
|
||||
#include "units/unit.hpp"
|
||||
#include "units/map.hpp"
|
||||
|
||||
#include <iomanip>
|
||||
@ -84,19 +83,7 @@ struct data {
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
std::string to_string() const {
|
||||
std::stringstream s;
|
||||
s << "---------------Content of leader data---------------\n";
|
||||
s << "For leader: " << leader->name() << "\n";
|
||||
s << "ratio_score: " << ratio_score << "\n";
|
||||
s << "recruit_count: " << recruit_count << "\n\n";
|
||||
for (const score_map::value_type& entry : scores) {
|
||||
s << std::setw(20) << entry.first <<
|
||||
" score: " << std::setw(7) << entry.second << "\n";
|
||||
}
|
||||
s << "----------------------------------------------------\n";
|
||||
return s.str();
|
||||
}
|
||||
std::string to_string() const;
|
||||
};
|
||||
|
||||
struct cached_combat_value {
|
||||
|
Loading…
x
Reference in New Issue
Block a user