diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-15 13:43:40 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-15 13:43:40 (GMT) |
commit | 5a8e35c51c6837aaa61714693b37d4d6b199da84 (patch) | |
tree | 9c1cb2729dad90913cc21077ce797dd68b47015a /tools/configure | |
parent | cd4c5a65b9d91fd84408205c3d20554122037730 (diff) | |
download | Qt-5a8e35c51c6837aaa61714693b37d4d6b199da84.zip Qt-5a8e35c51c6837aaa61714693b37d4d6b199da84.tar.gz Qt-5a8e35c51c6837aaa61714693b37d4d6b199da84.tar.bz2 |
Fix configure.exe when more than 256(!) else-ifs are required.
The introduction of the additional 'continuousElse' statement was
flawed because once the variable is toggled to true by the first else
block, it remains true for the second block even if the option was
found so these options will eventually hit the "Unknown option" error
in the final else case.
The workaround is not to re-use the variable for each block, but
instead use an array of bools. One element of the array per
'continuousElse' check. This should probably be refactored soon-ish :)
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2041715..a50019f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -439,7 +439,7 @@ void Configure::parseCmdLine() } for( ; i<configCmdLine.size(); ++i ) { - bool continueElse = false; + bool continueElse[] = {false, false}; if( configCmdLine.at(i) == "-help" || configCmdLine.at(i) == "-h" || configCmdLine.at(i) == "-?" ) @@ -687,8 +687,8 @@ void Configure::parseCmdLine() // Work around compiler nesting limitation else - continueElse = true; - if (!continueElse) { + continueElse[1] = true; + if (!continueElse[1]) { } // OpenGL Support ------------------------------------------- @@ -907,8 +907,8 @@ void Configure::parseCmdLine() // Work around compiler nesting limitation else - continueElse = true; - if (!continueElse) { + continueElse[0] = true; + if (!continueElse[0]) { } else if( configCmdLine.at(i) == "-internal" ) |