@@ -127,7 +127,7 @@ bool WEXPORT MFamily::hasSwitches( bool setable )
127127 return ( false );
128128}
129129
130- MSwitch* WEXPORT MFamily::findSwitch ( WString& switchtag , long fixed_version, int kludge )
130+ MSwitch* WEXPORT MFamily::findSwitch ( WString& swtag , long fixed_version, int kludge )
131131{
132132 //
133133 // Open Watcom IDE configuration/project files are buggy
@@ -136,15 +136,13 @@ MSwitch* WEXPORT MFamily::findSwitch( WString& switchtag, long fixed_version, in
136136 // It is very hard to detect what was broken in each OW version because
137137 // there vere no change to version number of project files
138138 //
139+ // type of non-exact search is defined by kludge parameter
140+ //
139141 int icount = _switches.count ();
140- if ( fixed_version == 0 || !isSetable ( switchtag ) ) {
142+ if ( fixed_version == 0 || !isSetable ( swtag ) ) {
141143 for ( int i = 0 ; i < icount; i++ ) {
142144 MSwitch* sw = (MSwitch*)_switches[i];
143- if ( sw->isTagEqual ( switchtag, kludge ) ) {
144- if ( kludge == 1 ) {
145- // upgrade switchtag to current configuration files version
146- sw->getTag ( switchtag );
147- }
145+ if ( sw->isTagEqual ( swtag, kludge ) ) {
148146 return ( sw );
149147 }
150148 }
@@ -153,11 +151,7 @@ MSwitch* WEXPORT MFamily::findSwitch( WString& switchtag, long fixed_version, in
153151 MSwitch* sw = (MSwitch*)_switches[i];
154152 if ( !sw->isSetable () )
155153 continue ;
156- if ( sw->isTagEqual ( switchtag, kludge ) ) {
157- if ( kludge == 1 ) {
158- // upgrade switchtag to current configuration files version
159- sw->getTag ( switchtag );
160- }
154+ if ( sw->isTagEqual ( swtag, kludge ) ) {
161155 return ( sw );
162156 }
163157 }
0 commit comments