File tree Expand file tree Collapse file tree
libs/libGamedata/gameData Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,9 +26,10 @@ CampaignDescription::CampaignDescription(const boost::filesystem::path& campaign
2626 if (!parentPath.parent_path ().has_parent_path ())
2727 {
2828 // Only alpha-numeric folder names are allowed
29- const auto isNonAlNum = [](const char c) {
30- return !(( c >= ' a' && c <= ' z' ) || (c >= ' A' && c <= ' Z' ) || (c >= ' 0' && c <= ' 9' ) );
29+ const auto isAlNum = [](const char c) {
30+ return ( c >= ' a' && c <= ' z' ) || (c >= ' A' && c <= ' Z' ) || (c >= ' 0' && c <= ' 9' );
3131 };
32+ const auto isNonAlNum = [isAlNum](const char c) { return !isAlNum (c); };
3233 lua::assertTrue (!helpers::contains_if (parentPath.string (), isNonAlNum),
3334 helpers::format (_ (" Invalid path '%1%': Must be alpha-numeric" ), path));
3435 return (campaignPath / tmpPath).string ();
You can’t perform that action at this time.
0 commit comments