Remove trailing newlines from multiline log messages
This commit is contained in:
parent
a02709e0ff
commit
ba24612f73
131 changed files with 385 additions and 438 deletions
|
@ -1428,7 +1428,7 @@ void attack::perform()
|
|||
<< a_stats_->damage << "-" << a_stats_->num_blows << "(" << a_stats_->chance_to_hit
|
||||
<< "%) vs DEF: " << (d_stats_->weapon ? d_stats_->weapon->name() : "none") << " " << d_stats_->damage << "-"
|
||||
<< d_stats_->num_blows << "(" << d_stats_->chance_to_hit << "%)"
|
||||
<< (defender_strikes_first ? " defender first-strike" : "") << "\n";
|
||||
<< (defender_strikes_first ? " defender first-strike" : "");
|
||||
|
||||
// Play the pre-fight animation
|
||||
unit_display::unit_draw_weapon(a_.loc_, a_.get_unit(), a_stats_->weapon, d_stats_->weapon, d_.loc_, d_.get_unit_ptr());
|
||||
|
|
|
@ -1235,7 +1235,7 @@ std::size_t move_unit_and_record(const std::vector<map_location> &steps,
|
|||
// Avoid some silliness.
|
||||
if ( steps.size() < 2 || (steps.size() == 2 && steps.front() == steps.back()) ) {
|
||||
DBG_NG << "Ignoring a unit trying to jump on its hex at " <<
|
||||
( steps.empty() ? map_location::null_location() : steps.front() ) << ".\n";
|
||||
( steps.empty() ? map_location::null_location() : steps.front() ) << ".";
|
||||
return 0;
|
||||
}
|
||||
//if we have no fog activated then we always skip sighted
|
||||
|
|
|
@ -111,7 +111,7 @@ void addons_client::connect()
|
|||
const std::string id_desc = server_id_.empty() ? "<id not provided>" : server_id_;
|
||||
|
||||
LOG_ADDONS << "Server " << id_desc << " version " << version_desc
|
||||
<< " supports: " << utils::join(server_capabilities_, " ") << '\n';
|
||||
<< " supports: " << utils::join(server_capabilities_, " ");
|
||||
}
|
||||
|
||||
bool addons_client::request_addons_list(config& cfg)
|
||||
|
|
|
@ -106,7 +106,7 @@ void get_addon_install_info(const std::string& addon_name, config& cfg)
|
|||
} catch(const config::error& e) {
|
||||
ERR_CFG << "Failed to read add-on installation information for '"
|
||||
<< addon_name << "' from " << info_path << ":\n"
|
||||
<< e.message << std::endl;
|
||||
<< e.message;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ static filesystem::blacklist_pattern_list read_ignore_patterns(const std::string
|
|||
LOG_CFG << "searching for .ign file for '" << addon_name << "'...";
|
||||
if (!filesystem::file_exists(ign_file)) {
|
||||
LOG_CFG << "no .ign file found for '" << addon_name << "'\n"
|
||||
<< "using default ignore patterns...\n";
|
||||
<< "using default ignore patterns...";
|
||||
return filesystem::default_blacklist;
|
||||
}
|
||||
LOG_CFG << "found .ign file: " << ign_file;
|
||||
|
|
|
@ -55,7 +55,7 @@ ai_composite::ai_composite( default_ai_context &context, const config &cfg)
|
|||
void ai_composite::on_create()
|
||||
{
|
||||
LOG_AI_COMPOSITE << "side "<< get_side() << " : "<<" created AI with id=["<<
|
||||
cfg_["id"]<<"]"<<std::endl;
|
||||
cfg_["id"]<<"]";
|
||||
|
||||
// init the composite ai stages
|
||||
for (const config &cfg_element : cfg_.child_range("stage")) {
|
||||
|
|
|
@ -622,7 +622,7 @@ engine_ptr readonly_context_impl::get_engine_by_cfg(const config& cfg)
|
|||
engine_factory::factory_map::iterator eng = engine_factory::get_list().find(engine_name);
|
||||
if (eng == engine_factory::get_list().end()){
|
||||
ERR_AI << "side "<<get_side()<<" : UNABLE TO FIND engine["<<
|
||||
engine_name <<"]" << std::endl;
|
||||
engine_name << ']';
|
||||
DBG_AI << "config snippet contains: " << std::endl << cfg;
|
||||
return engine_ptr();
|
||||
}
|
||||
|
@ -630,7 +630,7 @@ engine_ptr readonly_context_impl::get_engine_by_cfg(const config& cfg)
|
|||
engine_ptr new_engine = eng->second->get_new_instance(*this,engine_name);
|
||||
if (!new_engine) {
|
||||
ERR_AI << "side "<<get_side()<<" : UNABLE TO CREATE engine["<<
|
||||
engine_name <<"] " << std::endl;
|
||||
engine_name << ']';
|
||||
DBG_AI << "config snippet contains: " << std::endl << cfg;
|
||||
return engine_ptr();
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ double attack_analysis::rating(double aggression, const readonly_context& ai_obj
|
|||
const double exposure_mod = uses_leader ? 2.0 : ai_obj.get_caution();
|
||||
const double exposure = exposure_mod*resources_used*(terrain_quality - alternative_terrain_quality)*vulnerability/std::max<double>(0.01,support);
|
||||
LOG_AI << "attack option has base value " << value << " with exposure " << exposure << ": "
|
||||
<< vulnerability << "/" << support << " = " << (vulnerability/std::max<double>(support,0.1)) << "\n";
|
||||
<< vulnerability << "/" << support << " = " << (vulnerability/std::max<double>(support,0.1));
|
||||
value -= exposure*(1.0-aggression);
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ double attack_analysis::rating(double aggression, const readonly_context& ai_obj
|
|||
<< " vulnerability: " << vulnerability
|
||||
<< " support: " << support
|
||||
<< " quality: " << terrain_quality
|
||||
<< " alternative quality: " << alternative_terrain_quality << "\n";
|
||||
<< " alternative quality: " << alternative_terrain_quality;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ double combat_phase::evaluate()
|
|||
|
||||
int time_taken = SDL_GetTicks() - ticks;
|
||||
LOG_AI_TESTING_AI_DEFAULT << "took " << time_taken << " ticks for " << analysis.size()
|
||||
<< " positions. Analyzing...\n";
|
||||
<< " positions. Analyzing...";
|
||||
|
||||
ticks = SDL_GetTicks();
|
||||
|
||||
|
@ -214,7 +214,7 @@ double combat_phase::evaluate()
|
|||
|
||||
const double rating = it->rating(get_aggression(),*this);
|
||||
LOG_AI_TESTING_AI_DEFAULT << "attack option rated at " << rating << " ("
|
||||
<< (it->uses_leader ? get_leader_aggression() : get_aggression()) << ")\n";
|
||||
<< (it->uses_leader ? get_leader_aggression() : get_aggression()) << ")";
|
||||
|
||||
if(rating > choice_rating_) {
|
||||
choice_it = it;
|
||||
|
@ -652,7 +652,7 @@ void get_villages_phase::get_villages(
|
|||
|
||||
if(!reachmap.empty()) {
|
||||
DBG_AI_TESTING_AI_DEFAULT << reachmap.size() << " units left after removing the ones who "
|
||||
"can't reach a village, send the to the dispatcher.\n";
|
||||
"can't reach a village, send the to the dispatcher.";
|
||||
|
||||
dump_reachmap(reachmap);
|
||||
|
||||
|
@ -662,7 +662,7 @@ void get_villages_phase::get_villages(
|
|||
}
|
||||
|
||||
LOG_AI_TESTING_AI_DEFAULT << "Village assignment done: " << (SDL_GetTicks() - ticks)
|
||||
<< " ms, resulted in " << moves_.size() << " units being dispatched.\n";
|
||||
<< " ms, resulted in " << moves_.size() << " units being dispatched.";
|
||||
|
||||
}
|
||||
|
||||
|
@ -776,7 +776,7 @@ void get_villages_phase::find_villages(
|
|||
}
|
||||
|
||||
DBG_AI_TESTING_AI_DEFAULT << moves.size() << " units already dispatched, "
|
||||
<< reachmap.size() << " left to evaluate.\n";
|
||||
<< reachmap.size() << " left to evaluate.";
|
||||
}
|
||||
|
||||
void get_villages_phase::dispatch(treachmap& reachmap, tmoves& moves)
|
||||
|
@ -830,7 +830,7 @@ void get_villages_phase::dispatch(treachmap& reachmap, tmoves& moves)
|
|||
}
|
||||
|
||||
DBG_AI_TESTING_AI_DEFAULT << reachmap.size() << " units left for complex dispatch with "
|
||||
<< village_count << " villages left.\n";
|
||||
<< village_count << " villages left.";
|
||||
|
||||
dump_reachmap(reachmap);
|
||||
|
||||
|
@ -871,7 +871,7 @@ bool get_villages_phase::dispatch_unit_simple(treachmap& reachmap, tmoves& moves
|
|||
if(reachmap.size() == 1) {
|
||||
// One unit left.
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Dispatched _last_ unit at " << reachmap.begin()->first
|
||||
<< " to village " << reachmap.begin()->second[0] << '\n';
|
||||
<< " to village " << reachmap.begin()->second[0];
|
||||
|
||||
moves.emplace_back(reachmap.begin()->second[0], reachmap.begin()->first);
|
||||
|
||||
|
@ -959,7 +959,7 @@ get_villages_phase::treachmap::iterator get_villages_phase::remove_unit(
|
|||
|
||||
if(unit->first == leader_loc_ && best_leader_loc_ != map_location::null_location()) {
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Dispatch leader at " << leader_loc_ << " closer to the keep at "
|
||||
<< best_leader_loc_ << '\n';
|
||||
<< best_leader_loc_;
|
||||
|
||||
moves.emplace_back(best_leader_loc_, leader_loc_);
|
||||
}
|
||||
|
@ -1103,11 +1103,11 @@ void get_villages_phase::dispatch_complex(
|
|||
|
||||
// Dispatch
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Found a square.\nDispatched unit at " << units[src_itor->second]
|
||||
<< " to village " << village1 << '\n';
|
||||
<< " to village " << village1;
|
||||
moves.emplace_back(village1, units[src_itor->second]);
|
||||
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Dispatched unit at " << units[dst_itor->second]
|
||||
<< " to village " << village2 << '\n';
|
||||
<< " to village " << village2;
|
||||
moves.emplace_back(village2, units[dst_itor->second]);
|
||||
|
||||
// Remove the units
|
||||
|
@ -1157,7 +1157,7 @@ void get_villages_phase::dispatch_complex(
|
|||
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Too many units " << unit_count << " and villages "
|
||||
<< village_count<<" found, evaluate only the first "
|
||||
<< max_options << " options;\n";
|
||||
<< max_options << " options;";
|
||||
|
||||
std::vector<std::size_t> perm (max_options, 0);
|
||||
for(std::size_t i =0; i < max_options; ++i) {
|
||||
|
@ -1285,7 +1285,7 @@ void get_villages_phase::full_dispatch(treachmap& reachmap, tmoves& moves)
|
|||
treachmap::const_iterator itor = reachmap.begin();
|
||||
for(std::size_t i = 0; i < reachmap.size(); ++i, ++itor) {
|
||||
DBG_AI_TESTING_AI_DEFAULT << "Dispatched unit at " << itor->first
|
||||
<< " to village " << itor->second[i] << '\n';
|
||||
<< " to village " << itor->second[i];
|
||||
moves.emplace_back(itor->second[i], itor->first);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@ std::pair<map_location,map_location> move_to_targets_phase::choose_move(std::vec
|
|||
}
|
||||
} else {
|
||||
LOG_AI << "massing to attack " << best_target->loc.wml_x() << "," << best_target->loc.wml_y()
|
||||
<< " " << our_strength << "\n";
|
||||
<< " " << our_strength;
|
||||
|
||||
const double value = best_target->value;
|
||||
const map_location target_loc = best_target->loc;
|
||||
|
|
|
@ -206,7 +206,7 @@ std::vector<target> default_ai_context_impl::find_targets(const move_map& enemy_
|
|||
double value = village_value * (1.0 - leader_distance / corner_distance);
|
||||
LOG_AI << "found village target... " << *t
|
||||
<< " with value: " << value
|
||||
<< " distance: " << leader_distance << '\n';
|
||||
<< " distance: " << leader_distance;
|
||||
targets.emplace_back(*t,value,ai_target::type::village);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ double recruitment::evaluate() {
|
|||
void recruitment::execute() {
|
||||
LOG_AI_RECRUITMENT << "\n\n\n------------AI RECRUITMENT BEGIN---------------\n";
|
||||
LOG_AI_RECRUITMENT << "TURN: " << resources::tod_manager->turn() <<
|
||||
" SIDE: " << current_team().side() << "\n";
|
||||
" SIDE: " << current_team().side();
|
||||
|
||||
/*
|
||||
* Check which leaders can recruit and collect them in leader_data.
|
||||
|
|
|
@ -600,7 +600,7 @@ DEFINE_WFL_FUNCTION(calculate_outcome, 3, 4)
|
|||
args()[0]->evaluate(variables, add_debug_info(fdb, 0, "calculate_outcome:attacker_current_location")).convert_to<location_callable>()->loc();
|
||||
if(units.count(attacker_location) == 0) {
|
||||
ERR_AI << "Performing calculate_outcome() with non-existent attacker at (" <<
|
||||
attacker_location.wml_x() << "," << attacker_location.wml_y() << ")\n";
|
||||
attacker_location.wml_x() << "," << attacker_location.wml_y() << ")";
|
||||
return variant();
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ DEFINE_WFL_FUNCTION(calculate_outcome, 3, 4)
|
|||
args()[2]->evaluate(variables,add_debug_info(fdb, 2, "calculate_outcome:defender_location")).convert_to<location_callable>()->loc();
|
||||
if(units.count(defender_location) == 0) {
|
||||
ERR_AI << "Performing calculate_outcome() with non-existent defender at (" <<
|
||||
defender_location.wml_x() << "," << defender_location.wml_y() << ")\n";
|
||||
defender_location.wml_x() << "," << defender_location.wml_y() << ")";
|
||||
return variant();
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ bool simulated_attack(const map_location& attacker_loc, const map_location& defe
|
|||
unit_map::iterator defend_unit = resources::gameboard->units().find(defender_loc);
|
||||
|
||||
LOG_AI_SIM_ACTIONS << attack_unit->type_name() << " at " << attacker_loc << " attack "
|
||||
<< defend_unit->type_name() << " at " << defender_loc << std::endl;
|
||||
<< defend_unit->type_name() << " at " << defender_loc;
|
||||
LOG_AI_SIM_ACTIONS << "attacker's hp before attack: " << attack_unit->hitpoints();
|
||||
LOG_AI_SIM_ACTIONS << "defender's hp before attack: " << defend_unit->hitpoints();
|
||||
|
||||
|
@ -134,7 +134,7 @@ bool simulated_recall(int side, const std::string& unit_id, const map_location&
|
|||
own_team.spend_gold(recall_unit->recall_cost()<0 ? own_team.recall_cost() : recall_unit->recall_cost());
|
||||
|
||||
LOG_AI_SIM_ACTIONS << "recall " << recall_unit->type_name() << " at "
|
||||
<< recall_location << " spend " << own_team.recall_cost() << " gold" << std::endl;
|
||||
<< recall_location << " spend " << own_team.recall_cost() << " gold";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ bool simulated_recruit(int side, const unit_type* u, const map_location& recruit
|
|||
resources::gameboard->get_team(side).spend_gold(u->cost());
|
||||
|
||||
LOG_AI_SIM_ACTIONS << "recruit " << u->type_name() << " at "
|
||||
<< recruit_location << " spend " << u->cost() << " gold" << std::endl;
|
||||
<< recruit_location << " spend " << u->cost() << " gold";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ config& config::child(config_key_type key, int n)
|
|||
return *i->second.at(n);
|
||||
} catch(const std::out_of_range&) {
|
||||
DBG_CF << "The config object has only »" << i->second.size() << "« children named »" << key
|
||||
<< "«; request for the index »" << n << "« cannot be honored.\n";
|
||||
<< "«; request for the index »" << n << "« cannot be honored.";
|
||||
|
||||
if(throw_when_child_not_found::do_throw()) {
|
||||
throw error("Child at index not found");
|
||||
|
|
|
@ -349,7 +349,7 @@ bool config_cache::clean_cache()
|
|||
filesystem::get_files_in_dir(filesystem::get_cache_dir(), &files, &dirs, filesystem::name_mode::ENTIRE_FILE_PATH);
|
||||
|
||||
LOG_CACHE << "clean_cache(): " << files.size() << " files, "
|
||||
<< dirs.size() << " dirs to check\n";
|
||||
<< dirs.size() << " dirs to check";
|
||||
|
||||
const std::string& exclude_current = cache_file_prefix_ + "*";
|
||||
|
||||
|
@ -369,7 +369,7 @@ bool config_cache::purge_cache()
|
|||
filesystem::get_files_in_dir(filesystem::get_cache_dir(), &files, &dirs, filesystem::name_mode::ENTIRE_FILE_PATH);
|
||||
|
||||
LOG_CACHE << "purge_cache(): deleting " << files.size() << " files, "
|
||||
<< dirs.size() << " dirs\n";
|
||||
<< dirs.size() << " dirs";
|
||||
|
||||
bool status = true;
|
||||
|
||||
|
@ -393,7 +393,7 @@ bool config_cache::delete_cache_files(const std::vector<std::string>& paths,
|
|||
|
||||
if(utils::wildcard_string_match(fn, exclude_pattern)) {
|
||||
LOG_CACHE << "delete_cache_files(): skipping " << file_path
|
||||
<< " excluded by '" << exclude_pattern << "'\n";
|
||||
<< " excluded by '" << exclude_pattern << "'";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ bool config_cache::delete_cache_files(const std::vector<std::string>& paths,
|
|||
LOG_CACHE << "delete_cache_files(): deleting " << file_path;
|
||||
if(!filesystem::delete_directory(file_path)) {
|
||||
ERR_CACHE << "delete_cache_files(): could not delete "
|
||||
<< file_path << '\n';
|
||||
<< file_path;
|
||||
status = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,9 +166,9 @@ uint32_t send_dbus_notification(DBusConnection *connection, uint32_t replaces_id
|
|||
|
||||
std::string app_icon_ = filesystem::normalize_path(game_config::path + "/" + game_config::images::app_icon);
|
||||
if (!filesystem::file_exists(app_icon_)) {
|
||||
ERR_DU << "Error: Could not find notification icon.\n"
|
||||
<< "raw path =\'" << game_config::path << "\' / \'" << game_config::images::app_icon << "\'\n"
|
||||
<< "normalized path =\'" << app_icon_ << "\'\n";
|
||||
ERR_DU << "Error: Could not find notification icon.";
|
||||
ERR_DU << "raw path =\'" << game_config::path << "\' / \'" << game_config::images::app_icon << "\'";
|
||||
ERR_DU << "normalized path =\'" << app_icon_ << "\'";
|
||||
} else {
|
||||
DBG_DU << "app_icon_=\'" << app_icon_ << "\'";
|
||||
}
|
||||
|
@ -297,9 +297,9 @@ void send_notification(const std::string & owner, const std::string & message, b
|
|||
wnotify visual(id,owner,message);
|
||||
std::pair<wnotify_owner_it, bool> result = noticias.insert(visual);
|
||||
if (!result.second) {
|
||||
ERR_DU << "Failed to insert a dbus notification message:\n"
|
||||
<< "New Item:\n" << "\tid=" << id << "\n\towner=" << owner << "\n\tmessage=" << message << "\n"
|
||||
<< "Old Item:\n" << "\tid=" << result.first->id << "\n\towner=" << result.first->owner << "\n\tmessage=" << result.first->message << "\n";
|
||||
ERR_DU << "Failed to insert a dbus notification message:";
|
||||
ERR_DU << "New Item:\n" << "\tid=" << id << "\n\towner=" << owner << "\n\tmessage=" << message;
|
||||
ERR_DU << "Old Item:\n" << "\tid=" << result.first->id << "\n\towner=" << result.first->owner << "\n\tmessage=" << result.first->message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,8 +314,7 @@ std::string os_version()
|
|||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
if(!GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&v))) {
|
||||
ERR_DU << "os_version: GetVersionEx error ("
|
||||
<< GetLastError() << ")\n";
|
||||
ERR_DU << "os_version: GetVersionEx error (" << GetLastError() << ')';
|
||||
return base;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -85,8 +85,6 @@ static lg::log_domain log_display("display");
|
|||
#define MinZoom (zoom_levels.front())
|
||||
#define MaxZoom (zoom_levels.back())
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace {
|
||||
// if this is enabled with :benchmark, then everything is marked as invalid and redrawn each time
|
||||
bool benchmark = false;
|
||||
|
@ -787,7 +785,7 @@ surface display::screenshot(bool map_screenshot)
|
|||
WRN_DP << "Excessively large map screenshot area";
|
||||
}
|
||||
LOG_DP << "creating " << area.w << " by " << area.h
|
||||
<< " texture for map screenshot" << std::endl;
|
||||
<< " texture for map screenshot";
|
||||
texture output_texture(area.w, area.h, SDL_TEXTUREACCESS_TARGET);
|
||||
auto target_setter = draw::set_render_target(output_texture);
|
||||
auto clipper = draw::override_clip(area);
|
||||
|
@ -1422,7 +1420,7 @@ void display::draw_panel(const theme::panel& panel)
|
|||
texture tex(image::get_texture(panel.image()));
|
||||
if (!tex) {
|
||||
ERR_DP << "failed to load panel " << panel.get_id()
|
||||
<< " texture: " << panel.image() << endl;
|
||||
<< " texture: " << panel.image();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2689,7 +2687,7 @@ void display::draw_invalidated() {
|
|||
SDL_Rect clip_rect = get_clip_rect();
|
||||
auto clipper = draw::reduce_clip(clip_rect);
|
||||
DBG_DP << "drawing " << invalidated_.size() << " invalidated hexes"
|
||||
<< " with clip " << clip_rect << endl;
|
||||
<< " with clip " << clip_rect;
|
||||
for (const map_location& loc : invalidated_) {
|
||||
int xpos = get_location_x(loc);
|
||||
int ypos = get_location_y(loc);
|
||||
|
|
20
src/draw.cpp
20
src/draw.cpp
|
@ -29,8 +29,6 @@ static lg::log_domain log_draw("draw");
|
|||
#define DBG_D LOG_STREAM(debug, log_draw)
|
||||
#define WRN_D LOG_STREAM(warn, log_draw)
|
||||
|
||||
using std::endl;
|
||||
|
||||
static SDL_Renderer* renderer()
|
||||
{
|
||||
return CVideo::get_singleton().get_renderer();
|
||||
|
@ -173,7 +171,7 @@ void draw::rect(const SDL_Rect& rect, const color_t& c)
|
|||
void draw::line(int from_x, int from_y, int to_x, int to_y)
|
||||
{
|
||||
DBG_D << "line from (" << from_x << ',' << from_y
|
||||
<< ") to (" << to_x << ',' << to_y << ')' << endl;
|
||||
<< ") to (" << to_x << ',' << to_y << ')';
|
||||
SDL_RenderDrawLine(renderer(), from_x, from_y, to_x, to_y);
|
||||
}
|
||||
|
||||
|
@ -181,7 +179,7 @@ void draw::line(int from_x, int from_y, int to_x, int to_y, const color_t& c)
|
|||
{
|
||||
DBG_D << "line from (" << from_x << ',' << from_y
|
||||
<< ") to (" << to_x << ',' << to_y
|
||||
<< ") with colour " << c << endl;
|
||||
<< ") with colour " << c;
|
||||
SDL_SetRenderDrawColor(renderer(), c.r, c.g, c.b, c.a);
|
||||
SDL_RenderDrawLine(renderer(), from_x, from_y, to_x, to_y);
|
||||
}
|
||||
|
@ -207,7 +205,7 @@ void draw::circle(int cx, int cy, int r, const color_t& c, uint8_t octants)
|
|||
void draw::circle(int cx, int cy, int r, uint8_t octants)
|
||||
{
|
||||
DBG_D << "circle (" << cx << ',' << cy
|
||||
<< ") -> " << r << ", oct " << int(octants) << endl;
|
||||
<< ") -> " << r << ", oct " << int(octants);
|
||||
|
||||
// Algorithm based on
|
||||
// http://de.wikipedia.org/wiki/Rasterung_von_Kreisen#Methode_von_Horn
|
||||
|
@ -249,7 +247,7 @@ void draw::disc(int cx, int cy, int r, const color_t& c, uint8_t octants)
|
|||
void draw::disc(int cx, int cy, int r, uint8_t octants)
|
||||
{
|
||||
DBG_D << "disc (" << cx << ',' << cy
|
||||
<< ") -> " << r << ", oct " << int(octants) << endl;
|
||||
<< ") -> " << r << ", oct " << int(octants);
|
||||
|
||||
int d = -r;
|
||||
int x = r;
|
||||
|
@ -355,7 +353,7 @@ void draw::flipped(
|
|||
|
||||
if (!tex) { DBG_D << "null flipped"; return; }
|
||||
DBG_D << "flipped (" << flip_h << '|' << flip_v
|
||||
<< ") to " << dst << " from " << src << endl;
|
||||
<< ") to " << dst << " from " << src;
|
||||
|
||||
SDL_RendererFlip flip = get_flip(flip_h, flip_v);
|
||||
SDL_RenderCopyEx(renderer(), tex, &src, &dst, 0.0, nullptr, flip);
|
||||
|
@ -373,7 +371,7 @@ void draw::flipped(
|
|||
|
||||
if (!tex) { DBG_D << "null flipped"; return; }
|
||||
DBG_D << "flipped (" << flip_h << '|' << flip_v
|
||||
<< ") to " << dst << endl;
|
||||
<< ") to " << dst;
|
||||
|
||||
SDL_RendererFlip flip = get_flip(flip_h, flip_v);
|
||||
SDL_RenderCopyEx(renderer(), tex, nullptr, &dst, 0.0, nullptr, flip);
|
||||
|
@ -395,7 +393,7 @@ void draw::tiled(const texture& tex, const SDL_Rect& dst, bool centered,
|
|||
{
|
||||
if (!tex) { DBG_D << "null tiled"; return; }
|
||||
DBG_D << "tiled (" << centered << '|' << mirrored
|
||||
<< ") " << dst << endl;
|
||||
<< ") " << dst;
|
||||
|
||||
// Reduce clip to dst.
|
||||
auto clipper = draw::reduce_clip(dst);
|
||||
|
@ -423,7 +421,7 @@ void draw::tiled_highres(const texture& tex, const SDL_Rect& dst,
|
|||
{
|
||||
if (!tex) { DBG_D << "null tiled_highres"; return; }
|
||||
DBG_D << "tiled_highres (" << centered << '|' << mirrored
|
||||
<< ") " << dst << endl;
|
||||
<< ") " << dst;
|
||||
|
||||
const int pixel_scale = CVideo::get_singleton().get_pixel_scale();
|
||||
|
||||
|
@ -639,6 +637,6 @@ draw::render_target_setter::~render_target_setter()
|
|||
draw::render_target_setter draw::set_render_target(const texture& t)
|
||||
{
|
||||
DBG_D << "setting render target to "
|
||||
<< t.w() << 'x' << t.h() << " texture" << endl;
|
||||
<< t.w() << 'x' << t.h() << " texture";
|
||||
return draw::render_target_setter(t);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ static lg::log_domain log_draw_man("draw/manager");
|
|||
#define LOG_DM LOG_STREAM(info, log_draw_man)
|
||||
#define DBG_DM LOG_STREAM(debug, log_draw_man)
|
||||
|
||||
using std::endl;
|
||||
using gui2::top_level_drawable;
|
||||
|
||||
namespace {
|
||||
|
@ -55,7 +54,7 @@ void invalidate_region(const rect& region)
|
|||
{
|
||||
if (drawing_) {
|
||||
ERR_DM << "Attempted to invalidate region " << region
|
||||
<< " during draw" << endl;
|
||||
<< " during draw";
|
||||
throw game::error("invalidate during draw");
|
||||
}
|
||||
|
||||
|
@ -74,7 +73,7 @@ void invalidate_region(const rect& region)
|
|||
// This region contains a previously invalidated region,
|
||||
// might as well supercede it with this.
|
||||
DBG_DM << "superceding previous invalidation " << r
|
||||
<< " with " << region << endl;
|
||||
<< " with " << region;
|
||||
//STREAMING_LOG << '\'';
|
||||
r = region;
|
||||
return;
|
||||
|
@ -85,7 +84,7 @@ void invalidate_region(const rect& region)
|
|||
// This won't always be the best,
|
||||
// but it also won't ever be the worst.
|
||||
DBG_DM << "merging " << region << " with " << r
|
||||
<< " to invalidate " << m << endl;
|
||||
<< " to invalidate " << m;
|
||||
//STREAMING_LOG << ':';
|
||||
r = m;
|
||||
return;
|
||||
|
@ -95,7 +94,7 @@ void invalidate_region(const rect& region)
|
|||
cumulative_area += r.area();
|
||||
if (progressive_cover.area() <= cumulative_area) {
|
||||
DBG_DM << "conglomerating invalidations to "
|
||||
<< progressive_cover << endl;
|
||||
<< progressive_cover;
|
||||
//STREAMING_LOG << '%';
|
||||
// replace the first one, so we can easily prune later
|
||||
invalidated_regions_[0] = progressive_cover;
|
||||
|
|
|
@ -692,7 +692,7 @@ void context_manager::init_map_generators(const game_config_view& game_config)
|
|||
map_generators_.emplace_back(create_map_generator(i["map_generation"].empty() ? i["scenario_generation"] : i["map_generation"], generator_cfg.value()));
|
||||
} else {
|
||||
ERR_ED << "Scenario \"" << i["name"] << "\" with id " << i["id"]
|
||||
<< " has map_generation= but no [generator] tag" << std::endl;
|
||||
<< " has map_generation= but no [generator] tag";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ void context_manager::load_map(const std::string& filename, bool new_context)
|
|||
if(get_map_context().get_map_data_key().empty()) {
|
||||
ERR_ED << "Internal error, map context filename changed: "
|
||||
<< filename << " -> " << get_map_context().get_filename()
|
||||
<< " with no apparent scenario load\n";
|
||||
<< " with no apparent scenario load";
|
||||
} else {
|
||||
utils::string_map symbols;
|
||||
symbols["old"] = filename;
|
||||
|
|
|
@ -685,7 +685,7 @@ void map_context::set_map(const editor_map& map)
|
|||
void map_context::perform_action(const editor_action& action)
|
||||
{
|
||||
LOG_ED << "Performing action " << action.get_id() << ": " << action.get_name() << ", actions count is "
|
||||
<< action.get_instance_count() << std::endl;
|
||||
<< action.get_instance_count();
|
||||
auto undo = action.perform(*this);
|
||||
if(actions_since_save_ < 0) {
|
||||
// set to a value that will make it impossible to get to zero, as at this point
|
||||
|
@ -705,7 +705,7 @@ void map_context::perform_action(const editor_action& action)
|
|||
void map_context::perform_partial_action(const editor_action& action)
|
||||
{
|
||||
LOG_ED << "Performing (partial) action " << action.get_id() << ": " << action.get_name() << ", actions count is "
|
||||
<< action.get_instance_count() << std::endl;
|
||||
<< action.get_instance_count();
|
||||
if(!can_undo()) {
|
||||
throw editor_logic_exception("Empty undo stack in perform_partial_action()");
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ void terrain_palette::setup(const game_config_view& cfg)
|
|||
DBG_ED << "Palette: processing terrain " << t_info.name()
|
||||
<< "(editor name: '" << t_info.editor_name() << "') "
|
||||
<< "(" << t_info.number() << ")"
|
||||
<< ": " << t_info.editor_group() << "\n";
|
||||
<< ": " << t_info.editor_group();
|
||||
|
||||
// don't display terrains that were automatically created from base+overlay
|
||||
if (t_info.is_combined()) continue;
|
||||
|
|
|
@ -112,7 +112,7 @@ void editor_toolkit::hotkey_set_mouse_action(hotkey::HOTKEY_COMMAND command)
|
|||
palette_manager_->active_palette().hide(false);
|
||||
} else {
|
||||
ERR_ED << "Invalid hotkey command ("
|
||||
<< static_cast<int>(command) << ") passed to set_mouse_action\n";
|
||||
<< static_cast<int>(command) << ") passed to set_mouse_action";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -407,8 +407,7 @@ void get_files_in_dir(const std::string& dir,
|
|||
if(checksum != nullptr) {
|
||||
std::time_t mtime = bfs::last_write_time(di->path(), ec);
|
||||
if(ec) {
|
||||
LOG_FS << "Failed to read modification time of " << di->path().string() << ": " << ec.message()
|
||||
<< '\n';
|
||||
LOG_FS << "Failed to read modification time of " << di->path().string() << ": " << ec.message();
|
||||
} else if(mtime > checksum->modified) {
|
||||
checksum->modified = mtime;
|
||||
}
|
||||
|
@ -440,7 +439,7 @@ void get_files_in_dir(const std::string& dir,
|
|||
LOG_FS << "Failed to get file status of " << inner_main.string() << ": " << ec.message();
|
||||
} else if(reorder == reorder_mode::DO_REORDER && main_st.type() == bfs::regular_file) {
|
||||
LOG_FS << "_main.cfg found : "
|
||||
<< (mode == name_mode::ENTIRE_FILE_PATH ? inner_main.string() : inner_main.filename().string()) << '\n';
|
||||
<< (mode == name_mode::ENTIRE_FILE_PATH ? inner_main.string() : inner_main.filename().string());
|
||||
push_if_exists(files, inner_main, mode == name_mode::ENTIRE_FILE_PATH);
|
||||
} else {
|
||||
push_if_exists(dirs, di->path(), mode == name_mode::ENTIRE_FILE_PATH);
|
||||
|
@ -649,7 +648,7 @@ void set_user_data_dir(std::string newprefdir)
|
|||
//
|
||||
ERR_FS << "Could not determine path to user's Documents folder! (" << std::hex << "0x" << res << std::dec << ") "
|
||||
<< "User config/data directories may be unavailable for "
|
||||
<< "this session. Please report this as a bug.\n";
|
||||
<< "this session. Please report this as a bug.";
|
||||
user_data_dir = bfs::path(get_cwd()) / newprefdir;
|
||||
} else {
|
||||
bfs::path games_path = bfs::path(docs_path) / "My Games";
|
||||
|
@ -1367,7 +1366,7 @@ static bool is_legal_file(const std::string& filename_str)
|
|||
|
||||
if(filename_str.find('\\') != std::string::npos) {
|
||||
ERR_FS << "Illegal path '" << filename_str
|
||||
<< R"end(' ("\" not allowed, for compatibility with GNU/Linux and macOS).)end" << std::endl;
|
||||
<< R"end(' ("\" not allowed, for compatibility with GNU/Linux and macOS).)end";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1459,7 +1458,7 @@ std::string get_binary_file_location(const std::string& type, const std::string&
|
|||
result = bpath.string();
|
||||
} else {
|
||||
WRN_FS << "Conflicting files in binary_path: '" << result
|
||||
<< "' and '" << bpath.string() << "'\n";
|
||||
<< "' and '" << bpath.string() << "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ const file_tree_checksum& data_tree_checksum(bool reset)
|
|||
get_file_tree_checksum_internal(get_user_data_dir() + "/data/",checksum);
|
||||
LOG_FS << "calculated data tree checksum: "
|
||||
<< checksum.nfiles << " files; "
|
||||
<< checksum.sum_size << " bytes" << std::endl;
|
||||
<< checksum.sum_size << " bytes";
|
||||
}
|
||||
|
||||
return checksum;
|
||||
|
|
|
@ -36,8 +36,6 @@ static lg::log_domain log_font("font");
|
|||
static lg::log_domain log_display("display");
|
||||
#define ERR_DP LOG_STREAM(err, log_display)
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef std::map<int, font::floating_label> label_map;
|
||||
|
@ -217,7 +215,7 @@ void floating_label::update(int time)
|
|||
draw_manager::invalidate_region(draw_loc);
|
||||
|
||||
DBG_FT << "updating floating label from " << screen_loc_
|
||||
<< " to " << draw_loc << std::endl;
|
||||
<< " to " << draw_loc;
|
||||
|
||||
screen_loc_ = draw_loc;
|
||||
alpha_ = new_alpha;
|
||||
|
|
|
@ -99,8 +99,7 @@ bool load_font_config()
|
|||
filesystem::scoped_istream stream = preprocess_file(cfg_path);
|
||||
read(cfg, *stream);
|
||||
} catch(const config::error &e) {
|
||||
ERR_FT << "could not read fonts.cfg:\n"
|
||||
<< e.message << '\n';
|
||||
ERR_FT << "could not read fonts.cfg:\n" << e.message;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ bool pango_text::set_text(const std::string& text, const bool markedup)
|
|||
if(text != narrow) {
|
||||
ERR_GUI_L << "pango_text::" << __func__
|
||||
<< " text '" << text
|
||||
<< "' contains invalid utf-8, trimmed the invalid parts.\n";
|
||||
<< "' contains invalid utf-8, trimmed the invalid parts.";
|
||||
}
|
||||
if(markedup) {
|
||||
if(!this->set_markup(narrow, *layout_)) {
|
||||
|
@ -634,7 +634,7 @@ PangoRectangle pango_text::calculate_size(PangoLayout& layout) const
|
|||
<< " text '" << gui2::debug_truncate(text_)
|
||||
<< "' maximum_width " << maximum_width
|
||||
<< " width " << size.x + size.width
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
DBG_GUI_L << "pango_text::" << __func__
|
||||
<< " text '" << gui2::debug_truncate(text_)
|
||||
|
@ -644,14 +644,14 @@ PangoRectangle pango_text::calculate_size(PangoLayout& layout) const
|
|||
<< " maximum_width " << maximum_width
|
||||
<< " maximum_height " << maximum_height_
|
||||
<< " result " << size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
if(maximum_width != -1 && size.x + size.width > maximum_width) {
|
||||
DBG_GUI_L << "pango_text::" << __func__
|
||||
<< " text '" << gui2::debug_truncate(text_)
|
||||
<< " ' width " << size.x + size.width
|
||||
<< " greater as the wanted maximum of " << maximum_width
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
}
|
||||
|
||||
// The maximum height is handled here instead of using the library - see the comments in set_maximum_height()
|
||||
|
@ -660,7 +660,7 @@ PangoRectangle pango_text::calculate_size(PangoLayout& layout) const
|
|||
<< " text '" << gui2::debug_truncate(text_)
|
||||
<< " ' height " << size.y + size.height
|
||||
<< " greater as the wanted maximum of " << maximum_height_
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
size.height = maximum_height_ - std::max(0, size.y);
|
||||
}
|
||||
|
||||
|
@ -855,7 +855,7 @@ bool pango_text::set_markup(std::string_view text, PangoLayout& layout)
|
|||
} else {
|
||||
ERR_GUI_L << "pango_text::" << __func__
|
||||
<< " text '" << text
|
||||
<< "' has broken markup, set to normal text.\n";
|
||||
<< "' has broken markup, set to normal text.";
|
||||
set_text(_("The text contains invalid Pango markup: ") + std::string(text), false);
|
||||
}
|
||||
|
||||
|
@ -937,7 +937,7 @@ bool pango_text::validate_markup(std::string_view text, char** raw_text, std::st
|
|||
/* Replacement worked, still warn the user about the error. */
|
||||
WRN_GUI_L << "pango_text::" << __func__
|
||||
<< " text '" << text
|
||||
<< "' has unescaped ampersands '&', escaped them.\n";
|
||||
<< "' has unescaped ampersands '&', escaped them.";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ static std::string do_interpolation(const std::string &str, const variable_set&
|
|||
if(paren_nesting_level > 0) {
|
||||
ERR_NG << "Formula in WML string cannot be evaluated due to "
|
||||
<< "a missing closing parenthesis:\n\t--> \""
|
||||
<< std::string(var_begin, var_end) << "\"\n";
|
||||
<< std::string(var_begin, var_end) << "\"";
|
||||
res.replace(var_begin, var_end, "");
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -487,8 +487,8 @@ WML_HANDLER_FUNCTION(recall,, cfg)
|
|||
const std::string player_id = resources::gameboard->teams()[index].save_id_or_number();
|
||||
|
||||
if(resources::gameboard->teams()[index].recall_list().size() < 1) {
|
||||
DBG_NG << "recall list is empty when trying to recall!\n"
|
||||
<< "player_id: " << player_id << " side: " << index+1 << "\n";
|
||||
DBG_NG << "recall list is empty when trying to recall!";
|
||||
DBG_NG << "player_id: " << player_id << " side: " << index+1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -856,7 +856,7 @@ WML_HANDLER_FUNCTION(tunnel,, cfg)
|
|||
cfg.get_children("target").empty() ||
|
||||
cfg.get_children("filter").empty()) {
|
||||
ERR_WML << "[tunnel] is missing a mandatory tag:\n"
|
||||
<< cfg.get_config().debug();
|
||||
<< cfg.get_config().debug();
|
||||
} else {
|
||||
pathfind::teleport_group tunnel(delay ? cfg : vconfig(cfg.get_parsed_config()), false);
|
||||
resources::tunnels->add(tunnel);
|
||||
|
|
|
@ -242,8 +242,8 @@ void wml_menu_item::to_config(config& cfg) const
|
|||
}
|
||||
|
||||
if(!use_hotkey_ && !use_wml_menu_) {
|
||||
ERR_NG << "Bad data: wml_menu_item with both use_wml_menu and use_hotkey set to false is not supposed to be "
|
||||
"possible.";
|
||||
ERR_NG << "Bad data: wml_menu_item with both use_wml_menu and "
|
||||
"use_hotkey set to false is not supposed to be possible.";
|
||||
cfg["use_hotkey"] = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -444,7 +444,8 @@ pump_result_t wml_event_pump::operator()()
|
|||
|
||||
if(impl_->instance_count >= game_config::max_loop) {
|
||||
ERR_NG << "game_events pump waiting to process new events because "
|
||||
<< "recursion level would exceed maximum: " << game_config::max_loop << '\n';
|
||||
<< "recursion level would exceed maximum: "
|
||||
<< game_config::max_loop;
|
||||
return pump_result_t();
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ bool connect_engine::can_start_game() const
|
|||
if(!side->ready_for_start()) {
|
||||
const int side_num = side->index() + 1;
|
||||
DBG_MP << "not all sides are ready, side " <<
|
||||
side_num << " not ready\n";
|
||||
side_num << " not ready";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -527,8 +527,7 @@ void connect_engine::start_game_commandline(const commandline_options& cmdline_o
|
|||
|
||||
// Update sides with commandline parameters.
|
||||
if(cmdline_opts.multiplayer_turns) {
|
||||
DBG_MP << "\tsetting turns: " << *cmdline_opts.multiplayer_turns <<
|
||||
std::endl;
|
||||
DBG_MP << "\tsetting turns: " << *cmdline_opts.multiplayer_turns;
|
||||
scenario()["turns"] = *cmdline_opts.multiplayer_turns;
|
||||
}
|
||||
|
||||
|
@ -666,7 +665,7 @@ std::pair<bool, bool> connect_engine::process_network_data(const config& data)
|
|||
update_and_send_diff();
|
||||
|
||||
ERR_CF << "ERROR: Couldn't assign a side to '" <<
|
||||
name << "'\n";
|
||||
name << "'";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1206,7 +1205,7 @@ void side_engine::resolve_random(randomness::mt_rng & rng, const std::vector<std
|
|||
|
||||
LOG_MP << "side " << (index_ + 1) << ": faction=" <<
|
||||
(flg_.current_faction())["name"] << ", leader=" <<
|
||||
flg_.current_leader() << ", gender=" << flg_.current_gender() << "\n";
|
||||
flg_.current_leader() << ", gender=" << flg_.current_gender();
|
||||
}
|
||||
|
||||
void side_engine::reset()
|
||||
|
|
|
@ -440,7 +440,7 @@ game_info::addon_req game_info::check_addon_version_compatibility(const config&
|
|||
<< "' addon_min_version_parsed='" << local_min_ver.str()
|
||||
<< "' addon_version='" << local_item["addon_version"]
|
||||
<< "' remote_ver='" << remote_ver.str()
|
||||
<< "'\n";
|
||||
<< "'";
|
||||
r.outcome = addon_req::CANNOT_SATISFY;
|
||||
|
||||
r.message = VGETTEXT("The host's version of <i>$addon</i> is incompatible. They have version <b>$host_ver</b> while you have version <b>$local_ver</b>.", {
|
||||
|
|
|
@ -364,7 +364,7 @@ height_map default_map_generator_job::generate_height_map(size_t width, size_t h
|
|||
|
||||
LOG_NG << "generate_height_map"
|
||||
<< " lowest=" << lowest
|
||||
<< " highest =" << highest << " \n";
|
||||
<< " highest =" << highest;
|
||||
// Normalize the heights to the range 0-1000:
|
||||
highest -= lowest;
|
||||
for(x = 0; std::size_t(x) != res.size(); ++x) {
|
||||
|
@ -701,7 +701,7 @@ std::string default_map_generator_job::default_generate_map(generator_data data,
|
|||
<< " island_off_center=" << data.island_off_center
|
||||
<< " max_lakes=" << data.max_lakes
|
||||
<< " link_castles=" << data.link_castles
|
||||
<< " show_labels=" << data.show_labels << "\n";
|
||||
<< " show_labels=" << data.show_labels;
|
||||
|
||||
// Odd widths are nasty
|
||||
VALIDATE(is_even(data.width), _("Random maps with an odd width aren't supported."));
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace
|
|||
|
||||
static void log_po_error(const std::string& lang, const std::string& dom, const std::string& detail) {
|
||||
ERR_G << "Error opening language file for " << lang << ", textdomain " << dom
|
||||
<< ":\n " << detail << '\n' << std::flush;
|
||||
<< ":\n " << detail;
|
||||
}
|
||||
|
||||
const char* get(int domain_id, const char* ctx, const char* msg_id) const override
|
||||
|
@ -245,7 +245,7 @@ namespace
|
|||
// so we can't possibly support that, and odds are it's a user
|
||||
// mistake (as in bug #23839).
|
||||
ERR_G << "illegal textdomain name '" << domain
|
||||
<< "', skipping textdomain\n";
|
||||
<< "', skipping textdomain";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ namespace
|
|||
<< "' country='" << info.country()
|
||||
<< "' language='" << info.language()
|
||||
<< "' encoding='" << info.encoding()
|
||||
<< "' variant='" << info.variant() << "')\n";
|
||||
<< "' variant='" << info.variant() << "')";
|
||||
}
|
||||
catch(const bl::conv::conversion_error&)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ namespace
|
|||
<< "' language='" << info.language()
|
||||
<< "' encoding='" << info.encoding()
|
||||
<< "' variant='" << info.variant()
|
||||
<< "'" << std::endl;
|
||||
<< "'";
|
||||
}
|
||||
catch(const std::runtime_error&)
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ namespace
|
|||
<< "' language='" << info.language()
|
||||
<< "' encoding='" << info.encoding()
|
||||
<< "' variant='" << info.variant()
|
||||
<< "'" << std::endl;
|
||||
<< "'";
|
||||
}
|
||||
is_dirty_ = false;
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public:
|
|||
bool next()
|
||||
{
|
||||
if(at_end()) {
|
||||
ERR_GUI_I << "Tried to move beyond end of the iteration range."
|
||||
<< std::endl;
|
||||
ERR_GUI_I << "Tried to move beyond end of the iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
|
||||
|
@ -83,7 +82,7 @@ public:
|
|||
case walker_base::fail:
|
||||
TST_GUI_I << "\n";
|
||||
ERR_GUI_E << "Tried to move beyond end of "
|
||||
"the widget iteration range.\n";
|
||||
"the widget iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
} else {
|
||||
|
@ -103,7 +102,7 @@ public:
|
|||
case walker_base::fail:
|
||||
TST_GUI_I << "\n";
|
||||
ERR_GUI_E << "Tried to move beyond end of "
|
||||
"the grid iteration range.\n";
|
||||
"the grid iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
} else {
|
||||
|
@ -135,7 +134,7 @@ public:
|
|||
case walker_base::fail:
|
||||
TST_GUI_I << "\n";
|
||||
ERR_GUI_E << "Tried to move beyond end of "
|
||||
"the child iteration range.\n";
|
||||
"the child iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
} else {
|
||||
|
@ -154,7 +153,7 @@ public:
|
|||
{
|
||||
if(at_end()) {
|
||||
ERR_GUI_I << "Tried to defer beyond end its "
|
||||
"iteration range iterator.\n";
|
||||
"iteration range iterator.";
|
||||
throw logic_error("Tried to defer an invalid iterator.");
|
||||
}
|
||||
if(!visit_widget::at_end(*root_)) {
|
||||
|
@ -167,7 +166,7 @@ public:
|
|||
return *visit_child::get(*root_);
|
||||
}
|
||||
ERR_GUI_I << "The iterator ended in an unknown "
|
||||
"state while deferring itself.\n";
|
||||
"state while deferring itself.";
|
||||
throw logic_error("Tried to defer an invalid iterator.");
|
||||
}
|
||||
|
||||
|
@ -205,8 +204,7 @@ public:
|
|||
bool next()
|
||||
{
|
||||
if(at_end()) {
|
||||
ERR_GUI_I << "Tried to move beyond end of the iteration range."
|
||||
<< std::endl;
|
||||
ERR_GUI_I << "Tried to move beyond end of the iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
|
||||
|
@ -225,7 +223,7 @@ public:
|
|||
case walker_base::fail:
|
||||
TST_GUI_I << "\n";
|
||||
ERR_GUI_E << "Tried to move beyond end of the "
|
||||
"widget iteration range.\n";
|
||||
"widget iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
} else {
|
||||
|
@ -245,7 +243,7 @@ public:
|
|||
case walker_base::fail:
|
||||
TST_GUI_I << "\n";
|
||||
ERR_GUI_E << "Tried to move beyond end of the grid "
|
||||
"iteration range.\n";
|
||||
"iteration range.";
|
||||
throw range_error("Tried to move beyond end of range.");
|
||||
}
|
||||
} else {
|
||||
|
@ -279,7 +277,7 @@ public:
|
|||
{
|
||||
if(at_end()) {
|
||||
ERR_GUI_I << "Tried to defer beyond end of the iteration "
|
||||
"range iterator.\n";
|
||||
"range iterator.";
|
||||
throw logic_error("Tried to defer an invalid iterator.");
|
||||
}
|
||||
if(!visit_widget::at_end(*root_)) {
|
||||
|
@ -292,7 +290,7 @@ public:
|
|||
return *visit_child::get(*root_);
|
||||
}
|
||||
ERR_GUI_I << "The iterator ended in an unknown "
|
||||
"state while deferring iteself.\n";
|
||||
"state while deferring iteself.";
|
||||
throw logic_error("Tried to defer an invalid iterator.");
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ void rectangle_shape::draw(wfl::map_formula_callable& variables)
|
|||
// Draw the border
|
||||
draw::set_color(border_color);
|
||||
DBG_GUI_D << "border thickness " << border_thickness_
|
||||
<< ", colour " << border_color << std::endl;
|
||||
<< ", colour " << border_color;
|
||||
for(int i = 0; i < border_thickness_; ++i) {
|
||||
const SDL_Rect dimensions {
|
||||
x + i,
|
||||
|
@ -555,13 +555,13 @@ void canvas::parse_cfg(const config& cfg)
|
|||
blur_depth_ = function.cfg["depth"];
|
||||
} else {
|
||||
ERR_GUI_P << "Canvas: found a pre commit function"
|
||||
<< " of an invalid type " << type << ".\n";
|
||||
<< " of an invalid type " << type << ".";
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
ERR_GUI_P << "Canvas: found a shape of an invalid type " << type
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ void mouse_motion::start_hover_timer(widget* widget, const point& coordinate)
|
|||
}
|
||||
|
||||
DBG_GUI_E << LOG_HEADER << "Start hover timer for widget '" << widget->id()
|
||||
<< "' at address " << widget << ".\n";
|
||||
<< "' at address " << widget << ".";
|
||||
|
||||
hover_timer_ = add_timer(50, std::bind(&mouse_motion::show_tooltip, this));
|
||||
|
||||
|
@ -347,7 +347,7 @@ void mouse_motion::stop_hover_timer()
|
|||
assert(hover_widget_);
|
||||
DBG_GUI_E << LOG_HEADER << "Stop hover timer for widget '"
|
||||
<< hover_widget_->id() << "' at address " << hover_widget_
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
if(!remove_timer(hover_timer_)) {
|
||||
ERR_GUI_E << LOG_HEADER << "Failed to remove hover timer.";
|
||||
|
@ -480,7 +480,7 @@ void mouse_button<I>::signal_handler_sdl_button_down(
|
|||
if(mouse_over != mouse_focus_) {
|
||||
#ifdef GUI2_SHOW_UNHANDLED_EVENT_WARNINGS
|
||||
WRN_GUI_E << LOG_HEADER << ". Mouse down on non focused widget "
|
||||
<< "and mouse not captured, we missed events.\n";
|
||||
<< "and mouse not captured, we missed events.";
|
||||
#endif
|
||||
mouse_focus_ = mouse_over;
|
||||
}
|
||||
|
|
|
@ -522,7 +522,7 @@ void sdl_event_handler::handle_event(const SDL_Event& event)
|
|||
default:
|
||||
#ifdef GUI2_SHOW_UNHANDLED_EVENT_WARNINGS
|
||||
WRN_GUI_E << "Unhandled event " << static_cast<uint32_t>(event.type)
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -670,7 +670,7 @@ void sdl_event_handler::mouse_button_up(const point& position, const uint8_t but
|
|||
default:
|
||||
#ifdef GUI2_SHOW_UNHANDLED_EVENT_WARNINGS
|
||||
WRN_GUI_E << "Unhandled 'mouse button up' event for button "
|
||||
<< static_cast<uint32_t>(button) << ".\n";
|
||||
<< static_cast<uint32_t>(button) << ".";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -691,7 +691,7 @@ void sdl_event_handler::mouse_button_down(const point& position, const uint8_t b
|
|||
default:
|
||||
#ifdef GUI2_SHOW_UNHANDLED_EVENT_WARNINGS
|
||||
WRN_GUI_E << "Unhandled 'mouse button down' event for button "
|
||||
<< static_cast<uint32_t>(button) << ".\n";
|
||||
<< static_cast<uint32_t>(button) << ".";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ resolution_definition_ptr get_control(const std::string& control_type, const std
|
|||
if(!found_fallback) {
|
||||
if(definition != "default") {
|
||||
LOG_GUI_G << "Control: type '" << control_type << "' definition '" << definition
|
||||
<< "' not found, falling back to 'default'.\n";
|
||||
<< "' not found, falling back to 'default'.";
|
||||
return get_control(control_type, "default");
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,7 @@ resolution_definition::resolution_definition(const config& cfg)
|
|||
, text_font_style(decode_font_style(cfg["text_font_style"]))
|
||||
, state()
|
||||
{
|
||||
DBG_GUI_P << "Parsing resolution " << window_width << ", " << window_height
|
||||
<< '\n';
|
||||
DBG_GUI_P << "Parsing resolution " << window_width << ", " << window_height;
|
||||
|
||||
linked_groups = parse_linked_group_definitions(cfg);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ unsigned get_v_align(const std::string& v_align)
|
|||
} else {
|
||||
if(!v_align.empty() && v_align != "center") {
|
||||
ERR_GUI_E << "Invalid vertical alignment '" << v_align
|
||||
<< "' falling back to 'center'.\n";
|
||||
<< "' falling back to 'center'.";
|
||||
}
|
||||
return grid::VERTICAL_ALIGN_CENTER;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ unsigned get_h_align(const std::string& h_align)
|
|||
} else {
|
||||
if(!h_align.empty() && h_align != "center") {
|
||||
ERR_GUI_E << "Invalid horizontal alignment '" << h_align
|
||||
<< "' falling back to 'center'.\n";
|
||||
<< "' falling back to 'center'.";
|
||||
}
|
||||
return grid::HORIZONTAL_ALIGN_CENTER;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ unsigned read_flags(const config& cfg)
|
|||
|
||||
if(!(cfg["vertical_alignment"]).empty()) {
|
||||
ERR_GUI_P << "vertical_grow and vertical_alignment "
|
||||
"can't be combined, alignment is ignored.\n";
|
||||
"can't be combined, alignment is ignored.";
|
||||
}
|
||||
} else {
|
||||
flags |= v_flags;
|
||||
|
@ -109,7 +109,7 @@ unsigned read_flags(const config& cfg)
|
|||
|
||||
if(!(cfg["horizontal_alignment"]).empty()) {
|
||||
ERR_GUI_P << "horizontal_grow and horizontal_alignment "
|
||||
"can't be combined, alignment is ignored.\n";
|
||||
"can't be combined, alignment is ignored.";
|
||||
}
|
||||
} else {
|
||||
flags |= h_flags;
|
||||
|
@ -126,7 +126,7 @@ scrollbar_mode get_scrollbar_mode(const std::string& scrollbar_mode)
|
|||
|
||||
if(scrollbar_mode_map.find(scrollbar_mode) == scrollbar_mode_map.end()) {
|
||||
ERR_GUI_E << "Invalid scrollbar mode '" << scrollbar_mode << "'."
|
||||
<< "Falling back to 'initial_auto'." << std::endl;
|
||||
<< "Falling back to 'initial_auto'.";
|
||||
|
||||
return scrollbar_container::AUTO_VISIBLE_FIRST_RUN;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ int get_retval(const std::string& retval_id,
|
|||
return result;
|
||||
} else {
|
||||
ERR_GUI_E << "Window builder: retval_id '" << retval_id
|
||||
<< "' is unknown.\n";
|
||||
<< "' is unknown.";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -213,8 +213,7 @@ public:
|
|||
|
||||
void next_page()
|
||||
{
|
||||
LOG_CHAT_LOG << "Entering chat_log::controller::next_page"
|
||||
<< std::endl;
|
||||
LOG_CHAT_LOG << "Entering chat_log::controller::next_page";
|
||||
if(model_.page >= model_.count_of_pages() - 1) {
|
||||
return;
|
||||
}
|
||||
|
@ -226,16 +225,14 @@ public:
|
|||
|
||||
void previous_page()
|
||||
{
|
||||
LOG_CHAT_LOG << "Entering chat_log::controller::previous_page"
|
||||
<< std::endl;
|
||||
LOG_CHAT_LOG << "Entering chat_log::controller::previous_page";
|
||||
if(model_.page == 0) {
|
||||
return;
|
||||
}
|
||||
model_.page--;
|
||||
LOG_CHAT_LOG << "Set page to " << model_.page + 1;
|
||||
update_view_from_model();
|
||||
LOG_CHAT_LOG << "Exiting chat_log::controller::previous_page"
|
||||
<< std::endl;
|
||||
LOG_CHAT_LOG << "Exiting chat_log::controller::previous_page";
|
||||
}
|
||||
|
||||
void filter()
|
||||
|
@ -248,14 +245,12 @@ public:
|
|||
void handle_page_number_changed()
|
||||
{
|
||||
LOG_CHAT_LOG
|
||||
<< "Entering chat_log::controller::handle_page_number_changed"
|
||||
<< std::endl;
|
||||
<< "Entering chat_log::controller::handle_page_number_changed";
|
||||
model_.page = model_.page_number->get_value() - 1;
|
||||
LOG_CHAT_LOG << "Set page to " << model_.page + 1;
|
||||
update_view_from_model();
|
||||
LOG_CHAT_LOG
|
||||
<< "Exiting chat_log::controller::handle_page_number_changed"
|
||||
<< std::endl;
|
||||
<< "Exiting chat_log::controller::handle_page_number_changed";
|
||||
}
|
||||
|
||||
std::pair<int, int> calculate_log_line_range()
|
||||
|
@ -266,8 +261,7 @@ public:
|
|||
const int page = model_.page;
|
||||
const int count_of_pages = std::max(1, model_.count_of_pages());
|
||||
|
||||
LOG_CHAT_LOG << "Page: " << page + 1 << " of " << count_of_pages
|
||||
<< '\n';
|
||||
LOG_CHAT_LOG << "Page: " << page + 1 << " of " << count_of_pages;
|
||||
|
||||
const int first = page * page_size;
|
||||
const int last = page < (count_of_pages - 1)
|
||||
|
@ -281,8 +275,8 @@ public:
|
|||
|
||||
void update_view_from_model(bool select_last_page = false)
|
||||
{
|
||||
LOG_CHAT_LOG << "Entering chat_log::controller::update_view_from_model"
|
||||
<< std::endl;
|
||||
LOG_CHAT_LOG
|
||||
<< "Entering chat_log::controller::update_view_from_model";
|
||||
model_.msg_label->set_use_markup(true);
|
||||
int size = model_.chat_log_history.size();
|
||||
LOG_CHAT_LOG << "Number of chat messages: " << size;
|
||||
|
@ -305,16 +299,16 @@ public:
|
|||
model_.populate_chat_message_list(first, last);
|
||||
model_.page_number->set_value_range(1, count_of_pages);
|
||||
model_.page_number->set_active(count_of_pages > 1);
|
||||
LOG_CHAT_LOG << "Maximum value of page number slider: "
|
||||
<< count_of_pages << std::endl;
|
||||
LOG_CHAT_LOG
|
||||
<< "Maximum value of page number slider: " << count_of_pages;
|
||||
model_.page_number->set_value(page + 1);
|
||||
|
||||
std::ostringstream cur_page_text;
|
||||
cur_page_text << (page + 1) << '/' << std::max(1, count_of_pages);
|
||||
model_.page_label->set_label(cur_page_text.str());
|
||||
|
||||
LOG_CHAT_LOG << "Exiting chat_log::controller::update_view_from_model"
|
||||
<< std::endl;
|
||||
LOG_CHAT_LOG
|
||||
<< "Exiting chat_log::controller::update_view_from_model";
|
||||
}
|
||||
|
||||
void handle_copy_button_clicked()
|
||||
|
|
|
@ -287,7 +287,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
if(list_i != gamelistbox_->get_item_count()) {
|
||||
gamelistbox_->add_row(make_game_row_data(game), list_i);
|
||||
DBG_LB << "Added a game listbox row not at the end" << list_i
|
||||
<< " " << gamelistbox_->get_item_count() << "\n";
|
||||
<< " " << gamelistbox_->get_item_count();
|
||||
list_rows_deleted--;
|
||||
} else {
|
||||
gamelistbox_->add_row(make_game_row_data(game));
|
||||
|
@ -309,7 +309,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
ERR_LB << "gamelist_id_at_row_ overflow! " << list_i << " + "
|
||||
<< list_rows_deleted
|
||||
<< " >= " << gamelist_id_at_row_.size()
|
||||
<< " -- triggering a full refresh\n";
|
||||
<< " -- triggering a full refresh";
|
||||
refresh_lobby();
|
||||
return;
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
int listbox_game_id = gamelist_id_at_row_[list_i + list_rows_deleted];
|
||||
if(game.id != listbox_game_id) {
|
||||
ERR_LB << "Listbox game id does not match expected id "
|
||||
<< listbox_game_id << " " << game.id << " (row " << list_i << ")\n";
|
||||
<< listbox_game_id << " " << game.id << " (row " << list_i << ")";
|
||||
refresh_lobby();
|
||||
return;
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
next_gamelist_id_at_row.push_back(game.id);
|
||||
} else if(game.display_status == mp::game_info::disp_status::DELETED) {
|
||||
LOG_LB << "Deleting game from listbox " << game.id << " (row "
|
||||
<< list_i << ")\n";
|
||||
<< list_i << ")";
|
||||
gamelistbox_->remove_row(list_i);
|
||||
++list_rows_deleted;
|
||||
} else {
|
||||
|
@ -352,7 +352,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
next_gamelist_id_at_row.swap(gamelist_id_at_row_);
|
||||
if(select_row >= static_cast<int>(gamelistbox_->get_item_count())) {
|
||||
ERR_LB << "Would select a row beyond the listbox" << select_row << " "
|
||||
<< gamelistbox_->get_item_count() << "\n";
|
||||
<< gamelistbox_->get_item_count();
|
||||
select_row = gamelistbox_->get_item_count() - 1;
|
||||
}
|
||||
|
||||
|
@ -519,7 +519,7 @@ void mp_lobby::update_gamelist_filter()
|
|||
DBG_LB << "mp_lobby::update_gamelist_filter";
|
||||
lobby_info_.apply_game_filter();
|
||||
DBG_LB << "Games in lobby_info: " << lobby_info_.games().size()
|
||||
<< ", games in listbox: " << gamelistbox_->get_item_count() << "\n";
|
||||
<< ", games in listbox: " << gamelistbox_->get_item_count();
|
||||
assert(lobby_info_.games().size() == gamelistbox_->get_item_count());
|
||||
|
||||
update_visible_games();
|
||||
|
@ -877,7 +877,7 @@ void mp_lobby::enter_game_by_index(const int index, JOIN_MODE mode)
|
|||
} catch(const std::out_of_range&) {
|
||||
// Game index was invalid!
|
||||
ERR_LB << "Attempted to join/observe a game with index out of range: " << index << ". "
|
||||
<< "Games vector size is " << lobby_info_.games().size() << std::endl;
|
||||
<< "Games vector size is " << lobby_info_.games().size();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ void mp_change_control::post_show(window& window)
|
|||
if(window.get_retval() == retval::OK) {
|
||||
DBG_GUI << "Main: changing control of side "
|
||||
<< sides_[selected_side_] << " to nick "
|
||||
<< nicks_[selected_nick_] << std::endl;
|
||||
<< nicks_[selected_nick_];
|
||||
|
||||
menu_handler_.request_control_change(
|
||||
sides_[selected_side_],
|
||||
|
|
|
@ -158,7 +158,7 @@ void show(const std::string& window_id,
|
|||
catch(const window_builder_invalid_id&)
|
||||
{
|
||||
ERR_CFG << "Tip with the requested id '" << window_id
|
||||
<< "' doesn't exist, fall back to the default.\n";
|
||||
<< "' doesn't exist, fall back to the default.";
|
||||
t.set_window_id("tooltip_large");
|
||||
try
|
||||
{
|
||||
|
@ -166,8 +166,7 @@ void show(const std::string& window_id,
|
|||
}
|
||||
catch(const window_builder_invalid_id&)
|
||||
{
|
||||
ERR_CFG << "Default tooltip doesn't exist, no message shown."
|
||||
<< std::endl;
|
||||
ERR_CFG << "Default tooltip doesn't exist, no message shown.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ void unit_create::post_show(window& window)
|
|||
} else if(static_cast<std::size_t>(selected_row) >= units_.size()) {
|
||||
// FIXME: maybe assert?
|
||||
ERR_GUI_G << "unit create dialog has more list items than known unit "
|
||||
"types; not good\n";
|
||||
"types; not good";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -468,7 +468,7 @@ std::unique_ptr<widget> builder_addon_list::build() const
|
|||
auto widget = std::make_unique<addon_list>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed add-on list '" << id <<
|
||||
"' with definition '" << definition << "'.\n";
|
||||
"' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = widget->cast_config_to<addon_list_definition>();
|
||||
assert(conf != nullptr);
|
||||
|
|
|
@ -184,7 +184,7 @@ std::unique_ptr<widget> builder_button::build() const
|
|||
widget->set_retval(get_retval(retval_id_, retval_, id));
|
||||
|
||||
DBG_GUI_G << "Window builder: placed button '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -579,7 +579,7 @@ void chatbox::process_message(const ::config& data, bool whisper /*= false*/)
|
|||
{
|
||||
std::string sender = data["sender"];
|
||||
DBG_LB << "process message from " << sender << " " << (whisper ? "(w)" : "")
|
||||
<< ", len " << data["message"].str().size() << '\n';
|
||||
<< ", len " << data["message"].str().size();
|
||||
|
||||
if(preferences::is_ignored(sender)) {
|
||||
return;
|
||||
|
@ -676,7 +676,7 @@ std::unique_ptr<widget> builder_chatbox::build() const
|
|||
auto widget = std::make_unique<chatbox>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed unit preview pane '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = widget->cast_config_to<chatbox_definition>();
|
||||
assert(conf);
|
||||
|
|
|
@ -173,7 +173,7 @@ point container_base::calculate_best_size() const
|
|||
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " border size " << border_size << " returning "
|
||||
<< result << ".\n";
|
||||
<< result << ".";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ std::unique_ptr<widget> builder_drawing::build() const
|
|||
widget->set_drawing_data(draw);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed drawing '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void grid::set_child(std::unique_ptr<widget> widget,
|
|||
if(cell.get_widget()) {
|
||||
// free a child when overwriting it
|
||||
WRN_GUI_G << LOG_HEADER << " child '" << cell.id() << "' at cell '"
|
||||
<< row << ',' << col << "' will be replaced.\n";
|
||||
<< row << ',' << col << "' will be replaced.";
|
||||
}
|
||||
|
||||
// copy data
|
||||
|
@ -246,7 +246,7 @@ void grid::request_reduce_width(const unsigned maximum_width)
|
|||
for(std::size_t col = 0; col < cols_; ++col) {
|
||||
if(too_wide - reduced >= col_width_[col]) {
|
||||
DBG_GUI_L << LOG_HEADER << " column " << col
|
||||
<< " is too small to be reduced.\n";
|
||||
<< " is too small to be reduced.";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void grid::request_reduce_width(const unsigned maximum_width)
|
|||
unsigned reduction = col_width_[col] - width;
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " reduced " << reduction
|
||||
<< " pixels for column " << col << ".\n";
|
||||
<< " pixels for column " << col << ".";
|
||||
|
||||
size.x -= reduction;
|
||||
reduced += reduction;
|
||||
|
@ -333,7 +333,7 @@ void grid::request_reduce_height(const unsigned maximum_height)
|
|||
if(too_high - reduced >= row_height_[row]) {
|
||||
DBG_GUI_L << LOG_HEADER << " row " << row << " height "
|
||||
<< row_height_[row] << " want to reduce " << too_high
|
||||
<< " is too small to be reduced fully try 1 pixel.\n";
|
||||
<< " is too small to be reduced fully try 1 pixel.";
|
||||
|
||||
wanted_height = 1;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ void grid::request_reduce_height(const unsigned maximum_height)
|
|||
|
||||
DBG_GUI_L << LOG_HEADER << " row " << row << " height "
|
||||
<< row_height_[row] << " want to reduce " << too_high
|
||||
<< " reduced " << reduction << " pixels.\n";
|
||||
<< " reduced " << reduction << " pixels.";
|
||||
|
||||
size.y -= reduction;
|
||||
reduced += reduction;
|
||||
|
@ -366,7 +366,7 @@ void grid::request_reduce_height(const unsigned maximum_height)
|
|||
size = calculate_best_size();
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " Requested maximum " << maximum_height
|
||||
<< " resulting height " << size.y << ".\n";
|
||||
<< " resulting height " << size.y << ".";
|
||||
|
||||
set_layout_size(size);
|
||||
}
|
||||
|
@ -452,12 +452,12 @@ point grid::calculate_best_size() const
|
|||
|
||||
for(unsigned row = 0; row < rows_; ++row) {
|
||||
DBG_GUI_L << LOG_HEADER << " the row_height_ for row " << row
|
||||
<< " will be " << row_height_[row] << ".\n";
|
||||
<< " will be " << row_height_[row] << ".";
|
||||
}
|
||||
|
||||
for(unsigned col = 0; col < cols_; ++col) {
|
||||
DBG_GUI_L << LOG_HEADER << " the col_width_ for column " << col
|
||||
<< " will be " << col_width_[col] << ".\n";
|
||||
<< " will be " << col_width_[col] << ".";
|
||||
}
|
||||
|
||||
const point result(
|
||||
|
@ -502,7 +502,7 @@ void grid::place(const point& origin, const point& size)
|
|||
assert(col_grow_factor_.size() == cols_);
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " best size " << best_size << " available size "
|
||||
<< size << ".\n";
|
||||
<< size << ".";
|
||||
|
||||
/***** BEST_SIZE *****/
|
||||
|
||||
|
@ -536,7 +536,7 @@ void grid::place(const point& origin, const point& size)
|
|||
|
||||
DBG_GUI_L << LOG_HEADER << " extra width " << w
|
||||
<< " will be divided amount " << w_size << " units in "
|
||||
<< cols_ << " columns.\n";
|
||||
<< cols_ << " columns.";
|
||||
|
||||
if(w_size == 0) {
|
||||
// If all sizes are 0 reset them to 1
|
||||
|
@ -553,7 +553,7 @@ void grid::place(const point& origin, const point& size)
|
|||
col_width_[i] += w_normal * col_grow_factor_[i];
|
||||
DBG_GUI_L << LOG_HEADER << " column " << i
|
||||
<< " with grow factor " << col_grow_factor_[i]
|
||||
<< " set width to " << col_width_[i] << ".\n";
|
||||
<< " set width to " << col_width_[i] << ".";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ void grid::place(const point& origin, const point& size)
|
|||
row_grow_factor_.begin(), row_grow_factor_.end(), 0);
|
||||
DBG_GUI_L << LOG_HEADER << " extra height " << h
|
||||
<< " will be divided amount " << h_size << " units in "
|
||||
<< rows_ << " rows.\n";
|
||||
<< rows_ << " rows.";
|
||||
|
||||
if(h_size == 0) {
|
||||
// If all sizes are 0 reset them to 1
|
||||
|
@ -580,7 +580,7 @@ void grid::place(const point& origin, const point& size)
|
|||
row_height_[i] += h_normal * row_grow_factor_[i];
|
||||
DBG_GUI_L << LOG_HEADER << " row " << i << " with grow factor "
|
||||
<< row_grow_factor_[i] << " set height to "
|
||||
<< row_height_[i] << ".\n";
|
||||
<< row_height_[i] << ".";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -717,7 +717,7 @@ void grid::set_rows_cols(const unsigned rows, const unsigned cols)
|
|||
|
||||
if(!children_.empty()) {
|
||||
WRN_GUI_G << LOG_HEADER << " resizing a non-empty grid "
|
||||
<< " may give unexpected problems.\n";
|
||||
<< " may give unexpected problems.";
|
||||
}
|
||||
|
||||
rows_ = rows;
|
||||
|
@ -733,14 +733,13 @@ point grid::child::get_best_size() const
|
|||
|
||||
if(!widget_) {
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " has widget " << false
|
||||
<< " returning " << border_space() << ".\n";
|
||||
<< " returning " << border_space() << ".";
|
||||
return border_space();
|
||||
}
|
||||
|
||||
if(widget_->get_visible() == widget::visibility::invisible) {
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " has widget " << true
|
||||
<< " widget visible " << false << " returning 0,0"
|
||||
<< ".\n";
|
||||
<< " widget visible " << false << " returning 0,0.";
|
||||
return point();
|
||||
}
|
||||
|
||||
|
@ -748,7 +747,7 @@ point grid::child::get_best_size() const
|
|||
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " has widget " << true
|
||||
<< " widget visible " << true << " returning " << best_size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
return best_size;
|
||||
}
|
||||
|
||||
|
@ -783,7 +782,7 @@ void grid::child::place(point origin, point size)
|
|||
if(size <= best_size) {
|
||||
DBG_GUI_L << LOG_CHILD_HEADER
|
||||
<< " in best size range setting widget to " << origin << " x "
|
||||
<< size << ".\n";
|
||||
<< size << ".";
|
||||
|
||||
get_widget()->place(origin, size);
|
||||
return;
|
||||
|
@ -800,7 +799,7 @@ void grid::child::place(point origin, point size)
|
|||
|
||||
DBG_GUI_L << LOG_CHILD_HEADER
|
||||
<< " in maximum size range setting widget to " << origin
|
||||
<< " x " << size << ".\n";
|
||||
<< " x " << size << ".";
|
||||
|
||||
get_widget()->place(origin, size);
|
||||
return;
|
||||
|
@ -819,7 +818,7 @@ void grid::child::place(point origin, point size)
|
|||
widget_size.y = size.y;
|
||||
}
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " vertical growing from "
|
||||
<< best_size.y << " to " << widget_size.y << ".\n";
|
||||
<< best_size.y << " to " << widget_size.y << ".";
|
||||
|
||||
} else if(v_flag == VERTICAL_ALIGN_TOP) {
|
||||
// Do nothing.
|
||||
|
@ -838,7 +837,7 @@ void grid::child::place(point origin, point size)
|
|||
|
||||
} else {
|
||||
ERR_GUI_L << LOG_CHILD_HEADER << " Invalid vertical alignment '"
|
||||
<< v_flag << "' specified.\n";
|
||||
<< v_flag << "' specified.";
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
@ -851,7 +850,7 @@ void grid::child::place(point origin, point size)
|
|||
widget_size.x = size.x;
|
||||
}
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " horizontal growing from "
|
||||
<< best_size.x << " to " << widget_size.x << ".\n";
|
||||
<< best_size.x << " to " << widget_size.x << ".";
|
||||
|
||||
} else if(h_flag == HORIZONTAL_ALIGN_LEFT) {
|
||||
// Do nothing.
|
||||
|
@ -866,16 +865,16 @@ void grid::child::place(point origin, point size)
|
|||
|
||||
widget_orig.x += (size.x - widget_size.x);
|
||||
DBG_GUI_L << LOG_CHILD_HEADER
|
||||
<< " horizontally aligned at the right.\n";
|
||||
<< " horizontally aligned at the right.";
|
||||
|
||||
} else {
|
||||
ERR_GUI_L << LOG_CHILD_HEADER << " No horizontal alignment '" << h_flag
|
||||
<< "' specified.\n";
|
||||
<< "' specified.";
|
||||
assert(false);
|
||||
}
|
||||
|
||||
DBG_GUI_L << LOG_CHILD_HEADER << " resize widget to " << widget_orig
|
||||
<< " x " << widget_size << ".\n";
|
||||
<< " x " << widget_size << ".";
|
||||
|
||||
get_widget()->place(widget_orig, widget_size);
|
||||
}
|
||||
|
@ -967,7 +966,7 @@ void grid::layout(const point& origin)
|
|||
const point size(col_width_[col], row_height_[row]);
|
||||
DBG_GUI_L << LOG_HEADER << " set widget at " << row << ',' << col
|
||||
<< " at origin " << orig << " with size " << size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
if(get_child(row, col).get_widget()) {
|
||||
get_child(row, col).place(orig, size);
|
||||
|
@ -1035,7 +1034,7 @@ unsigned grid_implementation::row_request_reduce_height(
|
|||
}
|
||||
|
||||
DBG_GUI_L << LOG_IMPL_HEADER << " maximum row height " << maximum_height
|
||||
<< " returning " << required_height << ".\n";
|
||||
<< " returning " << required_height << ".";
|
||||
|
||||
return required_height;
|
||||
}
|
||||
|
@ -1060,7 +1059,7 @@ unsigned grid_implementation::column_request_reduce_width(
|
|||
}
|
||||
|
||||
DBG_GUI_L << LOG_IMPL_HEADER << " maximum column width " << maximum_width
|
||||
<< " returning " << required_width << ".\n";
|
||||
<< " returning " << required_width << ".";
|
||||
|
||||
return required_width;
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ std::unique_ptr<widget> builder_horizontal_scrollbar::build() const
|
|||
|
||||
DBG_GUI_G << "Window builder:"
|
||||
<< " placed horizontal scrollbar '" << id << "' with definition '"
|
||||
<< definition << "'.\n";
|
||||
<< definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ std::unique_ptr<widget> builder_image::build() const
|
|||
auto widget = std::make_unique<image>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed image '" << id << "' with definition '"
|
||||
<< definition << "'.\n";
|
||||
<< definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ std::unique_ptr<widget> builder_label::build() const
|
|||
lbl->set_link_color(conf->link_color);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed label '" << id << "' with definition '"
|
||||
<< definition << "'.\n";
|
||||
<< definition << "'.";
|
||||
|
||||
return lbl;
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ void listbox::resize_content(const int width_modification,
|
|||
const int height_modification_pos)
|
||||
{
|
||||
DBG_GUI_L << LOG_HEADER << " current size " << content_grid()->get_size() << " width_modification "
|
||||
<< width_modification << " height_modification " << height_modification << ".\n";
|
||||
<< width_modification << " height_modification " << height_modification << ".";
|
||||
|
||||
if(content_resize_request(
|
||||
width_modification, height_modification, width_modification_pos, height_modification_pos))
|
||||
|
@ -413,7 +413,7 @@ void listbox::resize_content(const widget& row)
|
|||
}
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " current size " << content_grid()->get_size() << " row size " << row.get_best_size()
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
const point content = content_grid()->get_size();
|
||||
point size = row.get_best_size();
|
||||
|
|
|
@ -258,7 +258,7 @@ std::unique_ptr<widget> builder_menu_button::build() const
|
|||
}
|
||||
|
||||
DBG_GUI_G << "Window builder: placed menu_button '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ std::unique_ptr<widget> builder_minimap::build() const
|
|||
auto widget = std::make_unique<minimap>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed minimap '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ std::unique_ptr<widget> builder_multi_page::build() const
|
|||
widget->set_page_builders(builders);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed multi_page '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = widget->cast_config_to<multi_page_definition>();
|
||||
assert(conf);
|
||||
|
|
|
@ -283,7 +283,7 @@ std::unique_ptr<widget> builder_multimenu_button::build() const
|
|||
}
|
||||
|
||||
DBG_GUI_G << "Window builder: placed multimenu_button '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ std::unique_ptr<widget> builder_panel::build() const
|
|||
auto widget = std::make_unique<panel>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed panel '" << id << "' with definition '"
|
||||
<< definition << "'.\n";
|
||||
<< definition << "'.";
|
||||
|
||||
widget->init_grid(*grid);
|
||||
return widget;
|
||||
|
|
|
@ -130,7 +130,7 @@ std::unique_ptr<widget> builder_password_box::build() const
|
|||
widget->set_value(label_string);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed password box '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ std::unique_ptr<widget> builder_progress_bar::build() const
|
|||
auto widget = std::make_unique<progress_bar>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed progress bar '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ std::unique_ptr<widget> builder_repeating_button::build() const
|
|||
auto widget = std::make_unique<repeating_button>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed repeating button '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ std::unique_ptr<widget> builder_scroll_label::build() const
|
|||
widget->finalize_setup();
|
||||
|
||||
DBG_GUI_G << "Window builder: placed scroll label '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ void scrollbar_base::recalculate()
|
|||
assert(window);
|
||||
window->invalidate_layout();
|
||||
ERR_GUI_G << LOG_HEADER
|
||||
<< " Can't recalculate size, force a window layout phase.\n";
|
||||
<< " Can't recalculate size, force a window layout phase.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ void scrollbar_container::request_reduce_height(const unsigned maximum_height)
|
|||
if(resized && scrollbar_size.y > size.y) {
|
||||
vertical_scrollbar_grid_->set_visible(widget::visibility::invisible);
|
||||
DBG_GUI_L << LOG_HEADER << " request failed, showing the scrollbar"
|
||||
<< " increased the height to " << scrollbar_size.y << ".\n";
|
||||
<< " increased the height to " << scrollbar_size.y << ".";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ void scrollbar_container::request_reduce_width(const unsigned maximum_width)
|
|||
if(horizontal_scrollbar_mode_ == AUTO_VISIBLE_FIRST_RUN && scrollbar_size.x > size.x) {
|
||||
horizontal_scrollbar_grid_->set_visible(widget::visibility::invisible);
|
||||
DBG_GUI_L << LOG_HEADER << " request failed, showing the scrollbar"
|
||||
<< " increased the width to " << scrollbar_size.x << ".\n";
|
||||
<< " increased the width to " << scrollbar_size.x << ".";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ point scrollbar_container::calculate_best_size() const
|
|||
horizontal_scrollbar.y + std::max(vertical_scrollbar.y, content.y));
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " vertical_scrollbar " << vertical_scrollbar << " horizontal_scrollbar "
|
||||
<< horizontal_scrollbar << " content " << content << " result " << result << ".\n";
|
||||
<< horizontal_scrollbar << " content " << content << " result " << result << ".";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -608,7 +608,7 @@ bool scrollbar_container::content_resize_request(const int width_modification,
|
|||
const int height_modification_pos)
|
||||
{
|
||||
DBG_GUI_L << LOG_HEADER << " wanted width modification " << width_modification << " wanted height modification "
|
||||
<< height_modification << ".\n";
|
||||
<< height_modification << ".";
|
||||
|
||||
if(get_size() == point()) {
|
||||
DBG_GUI_L << LOG_HEADER << " initial setup not done, bailing out.";
|
||||
|
|
|
@ -104,7 +104,7 @@ std::unique_ptr<widget> builder_scrollbar_panel::build() const
|
|||
panel->set_horizontal_scrollbar_mode(horizontal_scrollbar_mode);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed scrollbar_panel '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = panel->cast_config_to<scrollbar_panel_definition>();
|
||||
assert(conf);
|
||||
|
|
|
@ -97,7 +97,7 @@ void slider::set_value(int value)
|
|||
<< " desired_value=" << value
|
||||
<< " minimum_value=" << minimum_value_
|
||||
<< " maximum_value=" << get_maximum_value()
|
||||
<< " step_size=" << step_size_ << "\n";
|
||||
<< " step_size=" << step_size_;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ std::unique_ptr<widget> builder_spacer::build() const
|
|||
auto widget = std::make_unique<spacer>(*this, width_, height_);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed spacer '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ std::unique_ptr<widget> builder_stacked_widget::build() const
|
|||
auto widget = std::make_unique<stacked_widget>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed stacked widget '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = widget->cast_config_to<stacked_widget_definition>();
|
||||
assert(conf);
|
||||
|
|
|
@ -209,7 +209,7 @@ void styled_widget::request_reduce_width(const unsigned maximum_width)
|
|||
|
||||
DBG_GUI_L << LOG_HEADER << " label '" << debug_truncate(label_)
|
||||
<< "' maximum_width " << maximum_width << " result " << size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
|
||||
} else if(label_.empty() || text_can_shrink()) {
|
||||
point size = get_best_size();
|
||||
|
@ -219,10 +219,10 @@ void styled_widget::request_reduce_width(const unsigned maximum_width)
|
|||
|
||||
DBG_GUI_L << LOG_HEADER << " styled_widget " << id()
|
||||
<< " maximum_width " << maximum_width << " result " << size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
} else {
|
||||
DBG_GUI_L << LOG_HEADER << " label '" << debug_truncate(label_)
|
||||
<< "' failed; either no label or wrapping not allowed.\n";
|
||||
<< "' failed; either no label or wrapping not allowed.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ void styled_widget::request_reduce_height(const unsigned maximum_height)
|
|||
|
||||
DBG_GUI_L << LOG_HEADER << " styled_widget " << id()
|
||||
<< " maximum_height " << maximum_height << " result " << size
|
||||
<< ".\n";
|
||||
<< ".";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ point styled_widget::calculate_best_size() const
|
|||
*/
|
||||
point result = get_best_text_size(minimum, maximum);
|
||||
DBG_GUI_L << LOG_HEADER << " label '" << debug_truncate(label_)
|
||||
<< "' result " << result << ".\n";
|
||||
<< "' result " << result << ".";
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,7 @@ int styled_widget::get_text_maximum_height() const
|
|||
void styled_widget::impl_draw_background()
|
||||
{
|
||||
DBG_GUI_D << LOG_HEADER << " label '" << debug_truncate(label_) << "' size "
|
||||
<< get_rectangle() << ".\n";
|
||||
<< get_rectangle() << ".";
|
||||
|
||||
get_canvas(get_state()).draw();
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ point styled_widget::get_best_text_size(point minimum_size, point maximum_size)
|
|||
if(get_characters_per_line() != 0 && !can_wrap()) {
|
||||
WRN_GUI_L << LOG_HEADER
|
||||
<< " Limited the number of characters per line, "
|
||||
<< "but wrapping is not set, output may not be as expected.\n";
|
||||
<< "but wrapping is not set, output may not be as expected.";
|
||||
}
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << "\n"
|
||||
|
@ -488,7 +488,7 @@ point styled_widget::get_best_text_size(point minimum_size, point maximum_size)
|
|||
<< "can_wrap: " << can_wrap() << "\n"
|
||||
<< "characters_per_line: " << get_characters_per_line() << "\n"
|
||||
<< "truncated: " << renderer_.is_truncated() << "\n"
|
||||
<< "renderer size: " << renderer_.get_size() << "\n\n"
|
||||
<< "renderer size: " << renderer_.get_size() << "\n"
|
||||
<< std::noboolalpha;
|
||||
|
||||
const point border(config_->text_extra_width,
|
||||
|
@ -516,7 +516,7 @@ point styled_widget::get_best_text_size(point minimum_size, point maximum_size)
|
|||
}
|
||||
|
||||
DBG_GUI_L << LOG_HEADER << " label '" << debug_truncate(label_)
|
||||
<< "' result " << size << ".\n";
|
||||
<< "' result " << size << ".";
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -606,7 +606,7 @@ builder_styled_widget::builder_styled_widget(const config& cfg)
|
|||
|
||||
|
||||
DBG_GUI_P << "Window builder: found styled_widget with id '" << id
|
||||
<< "' and definition '" << definition << "'.\n";
|
||||
<< "' and definition '" << definition << "'.";
|
||||
}
|
||||
|
||||
std::unique_ptr<widget> builder_styled_widget::build(const replacements_map& /*replacements*/) const
|
||||
|
|
|
@ -443,7 +443,7 @@ std::unique_ptr<widget> builder_text_box::build() const
|
|||
widget->set_hint_data(hint_text, hint_image);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed text box '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ std::unique_ptr<widget> builder_toggle_button::build() const
|
|||
widget->set_retval(get_retval(retval_id_, retval_, id));
|
||||
|
||||
DBG_GUI_G << "Window builder: placed toggle button '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ std::unique_ptr<widget> builder_toggle_panel::build() const
|
|||
widget->set_retval(get_retval(retval_id_, retval_, id));
|
||||
|
||||
DBG_GUI_G << "Window builder: placed toggle panel '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
widget->init_grid(*grid);
|
||||
return widget;
|
||||
|
|
|
@ -113,7 +113,7 @@ void tree_view::resize_content(const int width_modification,
|
|||
const int height_modification_pos)
|
||||
{
|
||||
DBG_GUI_L << LOG_HEADER << " current size " << content_grid()->get_size() << " width_modification "
|
||||
<< width_modification << " height_modification " << height_modification << ".\n";
|
||||
<< width_modification << " height_modification " << height_modification << ".";
|
||||
|
||||
if(content_resize_request(
|
||||
width_modification,
|
||||
|
|
|
@ -629,7 +629,7 @@ std::unique_ptr<widget> builder_unit_preview_pane::build() const
|
|||
auto widget = std::make_unique<unit_preview_pane>(*this);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed unit preview pane '" << id
|
||||
<< "' with definition '" << definition << "'.\n";
|
||||
<< "' with definition '" << definition << "'.";
|
||||
|
||||
const auto conf = widget->cast_config_to<unit_preview_pane_definition>();
|
||||
assert(conf);
|
||||
|
|
|
@ -143,7 +143,7 @@ std::unique_ptr<widget> builder_vertical_scrollbar::build() const
|
|||
|
||||
DBG_GUI_G << "Window builder:"
|
||||
<< " placed vertical scrollbar '" << id << "' with definition '"
|
||||
<< definition << "'.\n";
|
||||
<< definition << "'.";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ widget::widget(const builder_widget& builder)
|
|||
widget::~widget()
|
||||
{
|
||||
DBG_GUI_LF
|
||||
<< "widget destroy: " << static_cast<void*>(this) << " (id: " << id_
|
||||
<< ")\n";
|
||||
<< "widget destroy: " << static_cast<void*>(this)
|
||||
<< " (id: " << id_ << ')';
|
||||
|
||||
widget* p = parent();
|
||||
while(p) {
|
||||
|
@ -103,7 +103,7 @@ void widget::set_id(const std::string& id)
|
|||
DBG_GUI_LF
|
||||
<< "set id of " << static_cast<void*>(this) << " to '" << id << "' "
|
||||
<< "(was '" << id_ << "'). Widget type: "
|
||||
<< (this_ctrl ? this_ctrl->get_control_type() : typeid(widget).name()) << "\n";
|
||||
<< (this_ctrl ? this_ctrl->get_control_type() : typeid(widget).name());
|
||||
|
||||
id_ = id;
|
||||
}
|
||||
|
|
|
@ -1023,7 +1023,7 @@ void window_implementation::layout(window& window,
|
|||
|
||||
DBG_GUI_L << LOG_IMPL_HEADER << " best size : " << size
|
||||
<< " maximum size : " << maximum_width << ','
|
||||
<< maximum_height << ".\n";
|
||||
<< maximum_height << ".";
|
||||
if(size.x <= static_cast<int>(maximum_width)
|
||||
&& size.y <= static_cast<int>(maximum_height)) {
|
||||
|
||||
|
@ -1038,11 +1038,11 @@ void window_implementation::layout(window& window,
|
|||
if(size.x > static_cast<int>(maximum_width)) {
|
||||
DBG_GUI_L << LOG_IMPL_HEADER << " Result: Resize width failed."
|
||||
<< " Wanted width " << maximum_width
|
||||
<< " resulting width " << size.x << ".\n";
|
||||
<< " resulting width " << size.x << ".";
|
||||
throw layout_exception_width_resize_failed();
|
||||
}
|
||||
DBG_GUI_L << LOG_IMPL_HEADER
|
||||
<< " Status: Resize width succeeded.\n";
|
||||
<< " Status: Resize width succeeded.";
|
||||
}
|
||||
|
||||
if(size.y > static_cast<int>(maximum_height)) {
|
||||
|
@ -1052,11 +1052,11 @@ void window_implementation::layout(window& window,
|
|||
if(size.y > static_cast<int>(maximum_height)) {
|
||||
DBG_GUI_L << LOG_IMPL_HEADER << " Result: Resize height failed."
|
||||
<< " Wanted height " << maximum_height
|
||||
<< " resulting height " << size.y << ".\n";
|
||||
<< " resulting height " << size.y << ".";
|
||||
throw layout_exception_height_resize_failed();
|
||||
}
|
||||
DBG_GUI_L << LOG_IMPL_HEADER
|
||||
<< " Status: Resize height succeeded.\n";
|
||||
<< " Status: Resize height succeeded.";
|
||||
}
|
||||
|
||||
assert(size.x <= static_cast<int>(maximum_width)
|
||||
|
@ -1069,7 +1069,7 @@ void window_implementation::layout(window& window,
|
|||
catch(const layout_exception_width_modified&)
|
||||
{
|
||||
DBG_GUI_L << LOG_IMPL_HEADER
|
||||
<< " Status: Width has been modified, rerun.\n";
|
||||
<< " Status: Width has been modified, rerun.";
|
||||
|
||||
window.layout_initialize(false);
|
||||
window.layout_linked_widgets();
|
||||
|
@ -1139,7 +1139,7 @@ void window::signal_handler_click_dismiss(const event::ui_event event,
|
|||
const int mouse_button_mask)
|
||||
{
|
||||
DBG_GUI_E << LOG_HEADER << ' ' << event << " mouse_button_mask "
|
||||
<< static_cast<unsigned>(mouse_button_mask) << ".\n";
|
||||
<< static_cast<unsigned>(mouse_button_mask) << ".";
|
||||
|
||||
handled = halt = click_dismiss(mouse_button_mask);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ static lg::log_domain log_halo("halo");
|
|||
#define LOG_HL LOG_STREAM(info, log_halo)
|
||||
#define DBG_HL LOG_STREAM(debug, log_halo)
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace halo
|
||||
{
|
||||
|
||||
|
|
|
@ -606,7 +606,7 @@ void command_executor::queue_command(const SDL_Event& event, int index)
|
|||
bool release = event.type == SDL_KEYUP;
|
||||
if(press) {
|
||||
LOG_HK << "sending press event (keypress = " <<
|
||||
std::boolalpha << keypress << std::noboolalpha << ")\n";
|
||||
std::boolalpha << keypress << std::noboolalpha << ")";
|
||||
}
|
||||
if(keypress) {
|
||||
press_event_sent_ = true;
|
||||
|
|
|
@ -649,9 +649,8 @@ REGISTER_MOD_PARSER(TC, args)
|
|||
// Pass argseters for RC functor
|
||||
//
|
||||
if(!game_config::tc_info(params[1]).size()){
|
||||
ERR_DP << "could not load TC info for '" << params[1]
|
||||
<< "' palette\n"
|
||||
<< "bailing out from TC\n";
|
||||
ERR_DP << "could not load TC info for '" << params[1] << "' palette";
|
||||
ERR_DP << "bailing out from TC";
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -663,10 +662,8 @@ REGISTER_MOD_PARSER(TC, args)
|
|||
|
||||
rc_map = recolor_range(new_color,old_color);
|
||||
} catch(const config::error& e) {
|
||||
ERR_DP << "caught config::error while processing TC: "
|
||||
<< e.message
|
||||
<< '\n'
|
||||
<< "bailing out from TC\n";
|
||||
ERR_DP << "caught config::error while processing TC: " << e.message;
|
||||
ERR_DP << "bailing out from TC";
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -695,10 +692,8 @@ REGISTER_MOD_PARSER(RC, args)
|
|||
} catch (const config::error& e) {
|
||||
ERR_DP
|
||||
<< "caught config::error while processing color-range RC: "
|
||||
<< e.message
|
||||
<< '\n';
|
||||
ERR_DP
|
||||
<< "bailing out from RC\n";
|
||||
<< e.message;
|
||||
ERR_DP << "bailing out from RC";
|
||||
rc_map.clear();
|
||||
}
|
||||
|
||||
|
@ -729,10 +724,9 @@ REGISTER_MOD_PARSER(PAL, args)
|
|||
} catch(const config::error& e) {
|
||||
ERR_DP
|
||||
<< "caught config::error while processing PAL function: "
|
||||
<< e.message
|
||||
<< '\n';
|
||||
<< e.message;
|
||||
ERR_DP
|
||||
<< "bailing out from PAL\n";
|
||||
<< "bailing out from PAL";
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ int movetype::terrain_info::data::calc_value(
|
|||
ERR_CF << "infinite terrain_info recursion on "
|
||||
<< (params_.use_move ? "movement" : "defense") << ": "
|
||||
<< t_translation::write_terrain_code(terrain)
|
||||
<< " depth " << recurse_count << '\n';
|
||||
<< " depth " << recurse_count;
|
||||
return params_.default_value;
|
||||
}
|
||||
|
||||
|
@ -320,14 +320,14 @@ int movetype::terrain_info::data::calc_value(
|
|||
WRN_CF << "Terrain '" << terrain << "' has evaluated to " << result
|
||||
<< " (" << (params_.use_move ? "cost" : "defense")
|
||||
<< "), which is less than " << params_.min_value
|
||||
<< "; resetting to " << params_.min_value << ".\n";
|
||||
<< "; resetting to " << params_.min_value << ".";
|
||||
result = params_.min_value;
|
||||
}
|
||||
if ( result > params_.max_value ) {
|
||||
WRN_CF << "Terrain '" << terrain << "' has evaluated to " << result
|
||||
<< " (" << (params_.use_move ? "cost" : "defense")
|
||||
<< "), which is more than " << params_.max_value
|
||||
<< "; resetting to " << params_.max_value << ".\n";
|
||||
<< "; resetting to " << params_.max_value << ".";
|
||||
result = params_.max_value;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ uint32_t mt_rng::get_next_random()
|
|||
++random_calls_;
|
||||
DBG_RND << "pulled user random " << result
|
||||
<< " for call " << random_calls_
|
||||
<< " with seed " << std::hex << random_seed_ << std::endl;
|
||||
<< " with seed " << std::hex << random_seed_;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void mt_rng::seed_random(const uint32_t seed, const unsigned int call_count)
|
|||
mt_.discard(call_count);
|
||||
random_calls_ = call_count;
|
||||
DBG_RND << "Seeded random with " << std::hex << random_seed_ << std::dec << " with "
|
||||
<< random_calls_ << " calls." << std::endl;
|
||||
<< random_calls_ << " calls.";
|
||||
}
|
||||
|
||||
void mt_rng::seed_random(const std::string & seed_str, const unsigned int call_count)
|
||||
|
|
|
@ -152,7 +152,7 @@ template<typename Verifier> auto verbose_verify(Verifier&& verifier)
|
|||
X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256);
|
||||
bool verified = verifier(preverified, ctx);
|
||||
DBG_NW << "Verifying TLS certificate: " << subject_name << ": " <<
|
||||
(verified ? "verified" : "failed") << std::endl;
|
||||
(verified ? "verified" : "failed");
|
||||
BIO* bio = BIO_new(BIO_s_mem());
|
||||
char buffer[1024];
|
||||
X509_print(bio, cert);
|
||||
|
|
|
@ -510,7 +510,7 @@ static surface load_image_file(const image::locator& loc)
|
|||
location = filesystem::get_binary_file_location("images", webp_name);
|
||||
if(!location.empty()) {
|
||||
WRN_IMG << "Replaced missing '" << name << "' with found '"
|
||||
<< webp_name << "'." << std::endl;
|
||||
<< webp_name << "'.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ static surface load_image_sub_file(const image::locator& loc)
|
|||
ERR_CFG << "Failed to apply a modification to an image:\n"
|
||||
<< "Image: " << loc.get_filename() << "\n"
|
||||
<< "Modifications: " << ss.str() << "\n"
|
||||
<< "Error: " << e.message << "\n";
|
||||
<< "Error: " << e.message;
|
||||
}
|
||||
|
||||
// NOTE: do this *after* applying the mod or you'll get crashes!
|
||||
|
@ -844,15 +844,13 @@ surface get_surface(
|
|||
{
|
||||
DBG_IMG << "duplicate load: " << i_locator
|
||||
<< " [" << type << "]"
|
||||
<< " (" << duplicate_loads_ << "/" << total_loads_ << " total)"
|
||||
<< std::endl;
|
||||
<< " (" << duplicate_loads_ << "/" << total_loads_ << " total)";
|
||||
++duplicate_loads_;
|
||||
}
|
||||
++total_loads_;
|
||||
|
||||
if(skip_cache) {
|
||||
DBG_IMG << "surface cache [" << type << "] skip: "
|
||||
<< i_locator << std::endl;
|
||||
DBG_IMG << "surface cache [" << type << "] skip: " << i_locator;
|
||||
i_locator.add_to_cache(skip, true);
|
||||
} else {
|
||||
i_locator.add_to_cache(imap, res);
|
||||
|
@ -1164,8 +1162,7 @@ texture get_texture(const image::locator& i_locator, scale_quality quality, TYPE
|
|||
|
||||
// Cache the texture.
|
||||
if(skip_cache) {
|
||||
DBG_IMG << "texture cache [" << type << "] skip: "
|
||||
<< i_locator << std::endl;
|
||||
DBG_IMG << "texture cache [" << type << "] skip: " << i_locator;
|
||||
} else {
|
||||
i_locator.add_to_cache(*cache, res);
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ void playsingle_controller::play_side_impl()
|
|||
} else {
|
||||
// we should have skipped over empty controllers before so this shouldn't be possible
|
||||
ERR_NG << "Found invalid side controller " << side_controller::get_string(current_team().controller()) << " ("
|
||||
<< side_proxy_controller::get_string(current_team().proxy_controller()) << ") for side " << current_team().side() << "\n";
|
||||
<< side_proxy_controller::get_string(current_team().proxy_controller()) << ") for side " << current_team().side();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -254,9 +254,7 @@ void load_base_prefs() {
|
|||
read(prefs, *stream);
|
||||
#endif
|
||||
} catch(const config::error& e) {
|
||||
ERR_CFG << "Error loading preference, message: "
|
||||
<< e.what()
|
||||
<< std::endl;
|
||||
ERR_CFG << "Error loading preference, message: " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -788,7 +788,7 @@ REPLAY_RETURN do_replay_handle(bool one_move)
|
|||
// The same way it is possible that an unrenamable unit moves to a
|
||||
// hex where previously a renamable unit was.
|
||||
WRN_REPLAY << "attempt to rename unit at location: "
|
||||
<< loc << (u.valid() ? ", which is unrenamable" : ", where none exists (anymore)") << "\n";
|
||||
<< loc << (u.valid() ? ", which is unrenamable" : ", where none exists (anymore)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ void saved_game::set_defaults()
|
|||
|
||||
if(!is_loaded_game && !side["current_player"].empty()) {
|
||||
ERR_NG << "Removed invalid 'current_player' attribute from [side] while loading a scenario. Consider using "
|
||||
"'side_name' instead\n";
|
||||
"'side_name' instead";
|
||||
|
||||
side["current_player"] = config::attribute_value();
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ public:
|
|||
<< " goodbit:" << lfs->pistream_->good()
|
||||
<< " endoffile:" << lfs->pistream_->eof()
|
||||
<< " badbit:" << lfs->pistream_->bad()
|
||||
<< " failbit:" << lfs->pistream_->fail() << "\n";
|
||||
<< " failbit:" << lfs->pistream_->fail();
|
||||
#endif
|
||||
return lfs->buff_;
|
||||
}
|
||||
|
|
|
@ -1310,7 +1310,7 @@ bool preprocessor_data::get_chunk()
|
|||
|
||||
WRN_PREPROC << "Redefining macro " << symbol << " without explicit #undef at "
|
||||
<< lineno_string(new_pos.str()) << '\n'
|
||||
<< "previously defined at " << lineno_string(old_pos.str()) << '\n';
|
||||
<< "previously defined at " << lineno_string(old_pos.str());
|
||||
}
|
||||
|
||||
buffer.erase(buffer.end() - 7, buffer.end());
|
||||
|
@ -1332,8 +1332,7 @@ bool preprocessor_data::get_chunk()
|
|||
skip_spaces();
|
||||
const std::string& symbol = read_word();
|
||||
bool found = !filesystem::get_wml_location(symbol, directory_).empty();
|
||||
DBG_PREPROC << "testing for file or directory " << symbol << ": " << (found ? "found" : "not found")
|
||||
<< '\n';
|
||||
DBG_PREPROC << "testing for file or directory " << symbol << ": " << (found ? "found" : "not found");
|
||||
conditional_skip(negate ? found : !found);
|
||||
} else if(command == "ifver" || command == "ifnver") {
|
||||
const bool negate = command[2] == 'n';
|
||||
|
@ -1361,7 +1360,7 @@ bool preprocessor_data::get_chunk()
|
|||
|
||||
const bool found = do_version_check(version1, vop, version2);
|
||||
DBG_PREPROC << "testing version '" << version1.str() << "' against '" << version2.str() << "' ("
|
||||
<< vopstr << "): " << (found ? "match" : "no match") << '\n';
|
||||
<< vopstr << "): " << (found ? "match" : "no match");
|
||||
|
||||
conditional_skip(negate ? found : !found);
|
||||
} else {
|
||||
|
@ -1555,8 +1554,7 @@ bool preprocessor_data::get_chunk()
|
|||
|
||||
optional_arg_num++;
|
||||
|
||||
DBG_PREPROC << "Found override for " << argname << " in call to macro " << symbol
|
||||
<< "\n";
|
||||
DBG_PREPROC << "Found override for " << argname << " in call to macro " << symbol;
|
||||
} else {
|
||||
std::ostringstream warning;
|
||||
warning << "Unrecognized optional argument passed to macro '" << symbol << "': '"
|
||||
|
@ -1590,7 +1588,7 @@ bool preprocessor_data::get_chunk()
|
|||
res << in.rdbuf();
|
||||
|
||||
DBG_PREPROC << "Setting default for optional argument " << argument.first << " in macro "
|
||||
<< symbol << "\n";
|
||||
<< symbol;
|
||||
|
||||
(*defines)[argument.first] = res.str();
|
||||
}
|
||||
|
|
|
@ -187,8 +187,8 @@ schema_validator::schema_validator(const std::string& config_file_name, bool val
|
|||
counter_.emplace();
|
||||
cache_.emplace();
|
||||
root_.expand_all(root_);
|
||||
LOG_VL << "Schema file " << config_file_name << " was read.\n"
|
||||
<< "Validator initialized\n";
|
||||
LOG_VL << "Schema file " << config_file_name << " was read.";
|
||||
LOG_VL << "Validator initialized";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ std::vector<std::string> square_parenthetical_split(const std::string& val,
|
|||
}
|
||||
if (padding*padding_end > 0 && s_begin.size() != s_end.size()) {
|
||||
ERR_GENERAL << "Square bracket padding sizes not matching: "
|
||||
<< s_begin << " and " << s_end <<".\n";
|
||||
<< s_begin << " and " << s_end <<".";
|
||||
}
|
||||
if (padding_end > padding) padding = padding_end;
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ void server::load_config()
|
|||
if(cfg_.has_child("campaigns")) {
|
||||
config& campaigns = cfg_.child("campaigns");
|
||||
WRN_CS << "Old format addons have been detected in the config! They will be converted to the new file format! "
|
||||
<< campaigns.child_count("campaign") << " entries to be processed.\n";
|
||||
<< campaigns.child_count("campaign") << " entries to be processed.";
|
||||
for(config& campaign : campaigns.child_range("campaign")) {
|
||||
const std::string& addon_id = campaign["name"].str();
|
||||
const std::string& addon_file = campaign["filename"].str();
|
||||
|
@ -659,7 +659,7 @@ void server::handle_read_from_fifo(const boost::system::error_code& error, std::
|
|||
mark_dirty(addon_id);
|
||||
write_config();
|
||||
LOG_CS << "Set attribute on add-on '" << addon_id << "':\n"
|
||||
<< key << "=\"" << value << "\"\n";
|
||||
<< key << "=\"" << value << "\"";
|
||||
}
|
||||
}
|
||||
} else if(ctl == "log") {
|
||||
|
@ -906,7 +906,7 @@ void server::delete_addon(const std::string& id)
|
|||
|
||||
if(!filesystem::delete_directory(fn)) {
|
||||
ERR_CS << "Could not delete the directory for addon '" << id
|
||||
<< "' (" << fn << "): " << strerror(errno) << '\n';
|
||||
<< "' (" << fn << "): " << strerror(errno);
|
||||
}
|
||||
|
||||
addons_.erase(id);
|
||||
|
@ -1137,7 +1137,7 @@ void server::handle_request_campaign(const server::request& req)
|
|||
delivery_size += filesystem::file_size(update_pack_path);
|
||||
} else {
|
||||
ERR_CS << "Broken update sequence from version " << from << " to "
|
||||
<< to << " for the add-on '" << name << "', sending a full pack instead\n";
|
||||
<< to << " for the add-on '" << name << "', sending a full pack instead";
|
||||
force_use_full = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1498,7 +1498,7 @@ void server::handle_upload(const server::request& req)
|
|||
|
||||
LOG_CS << req << "Upload type: "
|
||||
<< (is_delta_upload ? "delta" : "full") << ", "
|
||||
<< (is_existing_upload ? "update" : "new") << '\n';
|
||||
<< (is_existing_upload ? "update" : "new");
|
||||
|
||||
// Write general metadata attributes
|
||||
|
||||
|
@ -1774,7 +1774,7 @@ void server::handle_upload(const server::request& req)
|
|||
if(filesystem::file_size(prev_path) <= 0 || filesystem::file_size(next_path) <= 0) {
|
||||
ERR_CS << "Unable to automatically generate an update pack for '" << name
|
||||
<< "' for version " << prev_version_name << " to " << next_version_name
|
||||
<< "!\n";
|
||||
<< "!";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void dbconn::log_sql_exception(const std::string& text, const mariadb::exception
|
|||
{
|
||||
ERR_SQL << text << '\n'
|
||||
<< "what: " << e.what() << '\n'
|
||||
<< "error id: " << e.error_id() << std::endl;
|
||||
<< "error id: " << e.error_id();
|
||||
}
|
||||
|
||||
mariadb::connection_ref dbconn::create_connection()
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue