-
-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc cleanups #6570
Misc cleanups #6570
Changes from 4 commits
1b8d1d6
b1ea4a5
2e869ce
3435cf7
9b72df3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ namespace | |
#ifdef CAIRO_HAS_WIN32_FONT | ||
bool is_valid_font_file(const std::string& file) | ||
{ | ||
static const std::array<std::string, 3> font_exts { ".ttf", ".ttc", ".otf" }; | ||
static const std::array font_exts { ".ttf", ".ttc", ".otf" }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea if it's a problem. but this change means three There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
|
||
for(const std::string& ext : font_exts) { | ||
if(filesystem::ends_with(file, ext)) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,7 @@ static void verify(const unit_map& units, const config& cfg) { | |
u->write(u_cfg); | ||
|
||
bool is_ok = true; | ||
static const std::array<std::string, 4> fields {{"type","hitpoints","experience","side"}}; | ||
static const std::array fields {"type","hitpoints","experience","side"}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again you've changed the type from |
||
for(const std::string& field : fields) { | ||
if (u_cfg[field] != un[field]) { | ||
errbuf << "ERROR IN FIELD '" << field << "' for unit at " | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4726,7 +4726,7 @@ void game_lua_kernel::set_game_display(game_display * gd) { | |
* elsewhere (in the C++ code). | ||
* Any child tags not in this list will be passed to Lua's on_load event. | ||
*/ | ||
static const std::array<std::string, 24> handled_file_tags {{ | ||
static const std::array handled_file_tags { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing again. (Aside: It seems to me that the function using this could just be an |
||
"color_palette", | ||
"color_range", | ||
"display", | ||
|
@@ -4751,7 +4751,7 @@ static const std::array<std::string, 24> handled_file_tags {{ | |
"tunnel", | ||
"undo_stack", | ||
"variables" | ||
}}; | ||
}; | ||
|
||
static bool is_handled_file_tag(const std::string& s) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a variable template. A variable template is like
template<typename T> bool whatever = something<T>::value;
. Please fix the comment.Also, why remove count? You could leave the count declaration and just use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right, I meant alias template. I removed
count
since I madevalues
use the alias so I figured might as well subsume it.