Fix outputname bug
This commit is contained in:
+5
-4
@@ -7,12 +7,13 @@
|
||||
#define STRINGIFY(x) #x
|
||||
#define STR(x) STRINGIFY(x)
|
||||
|
||||
// Major changes, probably not be backwards compatible
|
||||
// Major changes, might not be backwards compatible
|
||||
#define MAKEGEN_VERSION_MAJOR 1
|
||||
// Release, should be backwards compatible with any minor version
|
||||
// Release, should be backwards compatible
|
||||
#define MAKEGEN_VERSION_RELEASE 2
|
||||
// Minor changes, should be compatible with any other minor version with same major and release.
|
||||
#define MAKEGEN_VERSION_MINOR 0
|
||||
// Minor changes, generally bug fixes
|
||||
#define MAKEGEN_VERSION_MINOR 1
|
||||
|
||||
#define MAKEGEN_VERSION ("v" STR(MAKEGEN_VERSION_MAJOR) "." STR(MAKEGEN_VERSION_RELEASE) "." STR(MAKEGEN_VERSION_MINOR))
|
||||
|
||||
const static unsigned int FLAG_HELP = BIT(0);
|
||||
|
||||
+5
-4
@@ -27,13 +27,14 @@ ConfigFile::ConfigFile()
|
||||
});
|
||||
|
||||
// Removes all other characters
|
||||
std::remove_if(
|
||||
outputdir.begin(),
|
||||
outputdir.end(),
|
||||
auto it = std::remove_if(
|
||||
outputname.begin(),
|
||||
outputname.end(),
|
||||
[](unsigned char c)
|
||||
{
|
||||
return (c < 'a' || c > 'z') && c != '_';
|
||||
return (c < '0' || c > '9') && (c < 'a' || c > 'z') && c != '_';
|
||||
});
|
||||
outputname.erase(it, outputname.end());
|
||||
|
||||
// Add suffix
|
||||
outputname += ".out";
|
||||
|
||||
Reference in New Issue
Block a user