Merge pull request #20 from google/remove_exception
Removed the single usage of exceptions in all of glslang.
This commit is contained in:
commit
72becbe5a2
@ -213,10 +213,15 @@ namespace {
|
|||||||
verbosity = 1;
|
verbosity = 1;
|
||||||
|
|
||||||
if (a < argc) {
|
if (a < argc) {
|
||||||
try {
|
char* end_ptr = 0;
|
||||||
verbosity = std::stoi(argv[a]);
|
int verb = ::strtol(argv[a], &end_ptr, 10);
|
||||||
|
// If we have not read to the end of the string or
|
||||||
|
// the string contained no elements, then we do not want to
|
||||||
|
// store the value.
|
||||||
|
if (*end_ptr == '\0' && end_ptr != argv[a]) {
|
||||||
|
verbosity = verb;
|
||||||
++a;
|
++a;
|
||||||
} catch (const std::invalid_argument&) { } // ok to have no numeric value
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (arg == "--version" || arg == "-V") {
|
else if (arg == "--version" || arg == "-V") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user