author | simon <simon> | 2002-11-08 15:17:49 (UTC) |
---|---|---|
committer | simon <simon> | 2002-11-08 15:17:49 (UTC) |
commit | 447735be20fad2642617e3ba4f7ef0b598f597db (patch) (unidiff) | |
tree | 2627703ed5020debe5c408f42e31841618fbb47c | |
parent | c2d39953b626147400114dbde85d87bdf5081576 (diff) | |
download | opie-447735be20fad2642617e3ba4f7ef0b598f597db.zip opie-447735be20fad2642617e3ba4f7ef0b598f597db.tar.gz opie-447735be20fad2642617e3ba4f7ef0b598f597db.tar.bz2 |
- fix some more gcc3 warnings by removing statements with no effect:
- for ( it; it != interfaces.end(); ++it ){
+ for ( ; it != interfaces.end(); ++it ){
-rw-r--r-- | noncore/net/networksetup/interfaces/interfaces.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfaces.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaces.cpp b/noncore/net/networksetup/interfaces/interfaces.cpp index 377a6db..f1b8067 100644 --- a/noncore/net/networksetup/interfaces/interfaces.cpp +++ b/noncore/net/networksetup/interfaces/interfaces.cpp | |||
@@ -170,33 +170,33 @@ bool Interfaces::addInterface(QString interface, QString family, QString method) | |||
170 | * Copies interface with name interface to name newInterface | 170 | * Copies interface with name interface to name newInterface |
171 | * @param newInterface name of the new interface. | 171 | * @param newInterface name of the new interface. |
172 | * @return bool true if successfull | 172 | * @return bool true if successfull |
173 | */ | 173 | */ |
174 | bool Interfaces::copyInterface(QString interface, QString newInterface){ | 174 | bool Interfaces::copyInterface(QString interface, QString newInterface){ |
175 | if(!setInterface(interface)) return false; | 175 | if(!setInterface(interface)) return false; |
176 | 176 | ||
177 | QStringList::Iterator it = currentIface; | 177 | QStringList::Iterator it = currentIface; |
178 | it++; | 178 | it++; |
179 | 179 | ||
180 | bool error; | 180 | bool error; |
181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); | 181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); |
182 | if(!setInterface(newInterface)) return false; | 182 | if(!setInterface(newInterface)) return false; |
183 | QStringList::Iterator newIface = currentIface; | 183 | QStringList::Iterator newIface = currentIface; |
184 | newIface++; | 184 | newIface++; |
185 | 185 | ||
186 | for ( it; it != interfaces.end(); ++it ){ | 186 | for ( ; it != interfaces.end(); ++it ){ |
187 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) | 187 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) |
188 | break; | 188 | break; |
189 | newIface = interfaces.insert(newIface, *it); | 189 | newIface = interfaces.insert(newIface, *it); |
190 | } | 190 | } |
191 | 191 | ||
192 | return true; | 192 | return true; |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * Remove the currently selected interface and all of its options. | 196 | * Remove the currently selected interface and all of its options. |
197 | * @return bool if successfull or not. | 197 | * @return bool if successfull or not. |
198 | */ | 198 | */ |
199 | bool Interfaces::removeInterface(){ | 199 | bool Interfaces::removeInterface(){ |
200 | if(currentIface == interfaces.end()) | 200 | if(currentIface == interfaces.end()) |
201 | return false; | 201 | return false; |
202 | (*currentIface) = ""; | 202 | (*currentIface) = ""; |
@@ -543,33 +543,33 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri | |||
543 | } | 543 | } |
544 | } | 544 | } |
545 | return found; | 545 | return found; |
546 | } | 546 | } |
547 | 547 | ||
548 | /** | 548 | /** |
549 | * Removes all options in a stanza | 549 | * Removes all options in a stanza |
550 | * @param start the start of the stanza | 550 | * @param start the start of the stanza |
551 | * @return bool true if successfull, false otherwise. | 551 | * @return bool true if successfull, false otherwise. |
552 | */ | 552 | */ |
553 | bool Interfaces::removeAllOptions(QStringList::Iterator start){ | 553 | bool Interfaces::removeAllOptions(QStringList::Iterator start){ |
554 | if(start == interfaces.end()) | 554 | if(start == interfaces.end()) |
555 | return false; | 555 | return false; |
556 | 556 | ||
557 | QStringList::Iterator it = start; | 557 | QStringList::Iterator it = start; |
558 | it = ++it; | 558 | it = ++it; |
559 | for (it; it != interfaces.end(); ++it ) { | 559 | for (; it != interfaces.end(); ++it ) { |
560 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 560 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
561 | break; | 561 | break; |
562 | } | 562 | } |
563 | it = interfaces.remove(it); | 563 | it = interfaces.remove(it); |
564 | it = --it; | 564 | it = --it; |
565 | } | 565 | } |
566 | // Leave a space between this interface and the next. | 566 | // Leave a space between this interface and the next. |
567 | interfaces.insert(it, QString("")); | 567 | interfaces.insert(it, QString("")); |
568 | return true; | 568 | return true; |
569 | } | 569 | } |
570 | 570 | ||
571 | /** | 571 | /** |
572 | * Gets a value of an option in a stanza | 572 | * Gets a value of an option in a stanza |
573 | * @param start the start of the stanza | 573 | * @param start the start of the stanza |
574 | * @param option the option to use when getting the value. | 574 | * @param option the option to use when getting the value. |
575 | * @param bool true if errors false otherwise. | 575 | * @param bool true if errors false otherwise. |
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 377a6db..f1b8067 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp | |||
@@ -170,33 +170,33 @@ bool Interfaces::addInterface(QString interface, QString family, QString method) | |||
170 | * Copies interface with name interface to name newInterface | 170 | * Copies interface with name interface to name newInterface |
171 | * @param newInterface name of the new interface. | 171 | * @param newInterface name of the new interface. |
172 | * @return bool true if successfull | 172 | * @return bool true if successfull |
173 | */ | 173 | */ |
174 | bool Interfaces::copyInterface(QString interface, QString newInterface){ | 174 | bool Interfaces::copyInterface(QString interface, QString newInterface){ |
175 | if(!setInterface(interface)) return false; | 175 | if(!setInterface(interface)) return false; |
176 | 176 | ||
177 | QStringList::Iterator it = currentIface; | 177 | QStringList::Iterator it = currentIface; |
178 | it++; | 178 | it++; |
179 | 179 | ||
180 | bool error; | 180 | bool error; |
181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); | 181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); |
182 | if(!setInterface(newInterface)) return false; | 182 | if(!setInterface(newInterface)) return false; |
183 | QStringList::Iterator newIface = currentIface; | 183 | QStringList::Iterator newIface = currentIface; |
184 | newIface++; | 184 | newIface++; |
185 | 185 | ||
186 | for ( it; it != interfaces.end(); ++it ){ | 186 | for ( ; it != interfaces.end(); ++it ){ |
187 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) | 187 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) |
188 | break; | 188 | break; |
189 | newIface = interfaces.insert(newIface, *it); | 189 | newIface = interfaces.insert(newIface, *it); |
190 | } | 190 | } |
191 | 191 | ||
192 | return true; | 192 | return true; |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * Remove the currently selected interface and all of its options. | 196 | * Remove the currently selected interface and all of its options. |
197 | * @return bool if successfull or not. | 197 | * @return bool if successfull or not. |
198 | */ | 198 | */ |
199 | bool Interfaces::removeInterface(){ | 199 | bool Interfaces::removeInterface(){ |
200 | if(currentIface == interfaces.end()) | 200 | if(currentIface == interfaces.end()) |
201 | return false; | 201 | return false; |
202 | (*currentIface) = ""; | 202 | (*currentIface) = ""; |
@@ -543,33 +543,33 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri | |||
543 | } | 543 | } |
544 | } | 544 | } |
545 | return found; | 545 | return found; |
546 | } | 546 | } |
547 | 547 | ||
548 | /** | 548 | /** |
549 | * Removes all options in a stanza | 549 | * Removes all options in a stanza |
550 | * @param start the start of the stanza | 550 | * @param start the start of the stanza |
551 | * @return bool true if successfull, false otherwise. | 551 | * @return bool true if successfull, false otherwise. |
552 | */ | 552 | */ |
553 | bool Interfaces::removeAllOptions(QStringList::Iterator start){ | 553 | bool Interfaces::removeAllOptions(QStringList::Iterator start){ |
554 | if(start == interfaces.end()) | 554 | if(start == interfaces.end()) |
555 | return false; | 555 | return false; |
556 | 556 | ||
557 | QStringList::Iterator it = start; | 557 | QStringList::Iterator it = start; |
558 | it = ++it; | 558 | it = ++it; |
559 | for (it; it != interfaces.end(); ++it ) { | 559 | for (; it != interfaces.end(); ++it ) { |
560 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 560 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
561 | break; | 561 | break; |
562 | } | 562 | } |
563 | it = interfaces.remove(it); | 563 | it = interfaces.remove(it); |
564 | it = --it; | 564 | it = --it; |
565 | } | 565 | } |
566 | // Leave a space between this interface and the next. | 566 | // Leave a space between this interface and the next. |
567 | interfaces.insert(it, QString("")); | 567 | interfaces.insert(it, QString("")); |
568 | return true; | 568 | return true; |
569 | } | 569 | } |
570 | 570 | ||
571 | /** | 571 | /** |
572 | * Gets a value of an option in a stanza | 572 | * Gets a value of an option in a stanza |
573 | * @param start the start of the stanza | 573 | * @param start the start of the stanza |
574 | * @param option the option to use when getting the value. | 574 | * @param option the option to use when getting the value. |
575 | * @param bool true if errors false otherwise. | 575 | * @param bool true if errors false otherwise. |