C++11: Use sized enums (+4% performance).

This commit is contained in:
Wilson Snyder
2020-08-16 12:05:35 -04:00
parent ee9d6dd63f
commit 78aee6f4e7
32 changed files with 93 additions and 70 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ string V3Os::filenameNonExt(const string& filename) {
string V3Os::filenameSubstitute(const string& filename) {
string out;
enum { NONE, PAREN, CURLY } brackets = NONE;
enum : uint8_t { NONE, PAREN, CURLY } brackets = NONE;
for (string::size_type pos = 0; pos < filename.length(); ++pos) {
if ((filename[pos] == '$') && (pos + 1 < filename.length())) {
switch (filename[pos + 1]) {