fix whitespace

This commit is contained in:
Celtic Minstrel 2021-07-30 19:32:16 -04:00 committed by Celtic Minstrel
parent 35d22698eb
commit 6c12d7e01f
4 changed files with 13 additions and 13 deletions

View file

@ -43,7 +43,7 @@ if rawget(_G, 'unit_test') ~= nil then
function unit_test.log(prefix, message)
std_print(prefix .. ': ' .. message)
end
-- This is a way to ensure that all assertions contain a descriptive message
setmetatable(unit_test, {
__newindex = function(self, key, val)

View file

@ -487,13 +487,13 @@ config& config::child_or_add(config_key_type key)
utils::optional_reference<const config> config::get_deprecated_child(config_key_type old_key, const std::string& in_tag, DEP_LEVEL level, const std::string& message) const {
check_valid();
if(auto i = children_.find(old_key); i != children_.end() && !i->second.empty()) {
const std::string what = formatter() << "[" << in_tag << "][" << old_key << "]";
deprecated_message(what, level, "", message);
return *i->second.front();
}
return std::nullopt;
}
@ -501,13 +501,13 @@ config::const_child_itors config::get_deprecated_child_range(config_key_type old
check_valid();
static child_list dummy;
const child_list* p = &dummy;
if(auto i = children_.find(old_key); i != children_.end() && !i->second.empty()) {
const std::string what = formatter() << "[" << in_tag << "][" << old_key << "]";
deprecated_message(what, level, "", message);
p = &i->second;
}
return const_child_itors(const_child_iterator(p->begin()), const_child_iterator(p->end()));
}
@ -800,7 +800,7 @@ config::attribute_value& config::operator[](config_key_type key)
const config::attribute_value& config::get_old_attribute(config_key_type key, const std::string& old_key, const std::string& in_tag, const std::string& message) const
{
check_valid();
if(has_attribute(old_key)) {
const std::string what = formatter() << "[" << in_tag << "]" << old_key << "=";
const std::string msg = formatter() << "Use " << key << "= instead. " << message;
@ -823,13 +823,13 @@ const config::attribute_value& config::get_old_attribute(config_key_type key, co
const config::attribute_value& config::get_deprecated_attribute(config_key_type old_key, const std::string& in_tag, DEP_LEVEL level, const std::string& message) const {
check_valid();
if(auto i = values_.find(old_key); i != values_.end()) {
const std::string what = formatter() << "[" << in_tag << "]" << old_key << "=";
deprecated_message(what, level, "", message);
return i->second;
}
static const attribute_value empty_attribute;
return empty_attribute;
}

View file

@ -389,7 +389,7 @@ public:
* @returns The wanted child node.
*/
const config& child(config_key_type key, const std::string& parent) const;
/**
* Get a deprecated child and log a deprecation message
* @param old_key The deprecated child to return if present
@ -399,7 +399,7 @@ public:
* @note The deprecation message will be a level 3 deprecation.
*/
utils::optional_reference<const config> get_deprecated_child(config_key_type old_key, const std::string& in_tag, DEP_LEVEL level, const std::string& message) const;
/**
* Get a deprecated child rangw and log a deprecation message
* @param old_key The deprecated child to return if present
@ -486,13 +486,13 @@ public:
* @note The deprecation message will be a level 1 deprecation.
*/
const attribute_value &get_old_attribute(config_key_type key, const std::string &old_key, const std::string& in_tag, const std::string& message = "") const;
/**
* Get a deprecated attribute without a direct substitute,
* and log a deprecation message
* @param old_key The deprecated attribute to return if present
* @param in_tag The name of the tag this attribute appears in
* @param level The deprecation level
* @param level The deprecation level
* @param message An explanation of the deprecation, possibly mentioning an alternative
*/
const attribute_value& get_deprecated_attribute(config_key_type old_key, const std::string& in_tag, DEP_LEVEL level, const std::string& message) const;

View file

@ -120,4 +120,4 @@ void migrate_version_selection::post_show(window& window)
preferences::load_credentials();
}
}
} // namespace gui2::dialogs
} // namespace gui2::dialogs