Skip to content

Commit feb9d8a

Browse files
committed
argparser: first make all chars lower case then compare
1 parent 279fb06 commit feb9d8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpr/src/base/read_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ t_options read_options(int argc, const char** argv) {
3131

3232
struct ParseOnOff {
3333
ConvertedValue<bool> from_str(std::string str) {
34+
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
3435
ConvertedValue<bool> conv_value;
3536
if (str == "on")
3637
conv_value.set_value(true);
@@ -42,7 +43,6 @@ struct ParseOnOff {
4243
conv_value.set_error(msg.str());
4344
}
4445
return conv_value;
45-
;
4646
}
4747

4848
ConvertedValue<std::string> to_str(bool val) {

0 commit comments

Comments
 (0)