diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-03-31 14:23:55 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-03-31 14:23:55 +0000 |
commit | db45c881d98f2288aa26960e5eae6070f792b82a (patch) | |
tree | 21c3a259c7dcb9312d12acfaef2e76fd910d4de1 /src/formatter.h | |
parent | 85315f2cc85a0c44055cd94c1b7de8cfe11b46e1 (diff) | |
download | libbu++-db45c881d98f2288aa26960e5eae6070f792b82a.tar.gz libbu++-db45c881d98f2288aa26960e5eae6070f792b82a.tar.bz2 libbu++-db45c881d98f2288aa26960e5eae6070f792b82a.tar.xz libbu++-db45c881d98f2288aa26960e5eae6070f792b82a.zip |
Removed the bool cast operator from FBasicString. It turns out it was causing
way, way, way more problems than it solved. A number of libbu++ tests were
inacurate because of it, there were problems in several other programs, and
there may be more that have problems we haven't found yet because of this.
This will most likely cause complitaion errors, especially in places we didn't
expect, where strings were being stored into or passed as integers and the like.
In cases where you were just testing a string, just call the "isSet()" function,
which is functionally equivellent to the old bool cast operator.
Diffstat (limited to 'src/formatter.h')
-rw-r--r-- | src/formatter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/formatter.h b/src/formatter.h index ec84be5..47592ad 100644 --- a/src/formatter.h +++ b/src/formatter.h | |||
@@ -204,7 +204,7 @@ namespace Bu | |||
204 | template<typename type> | 204 | template<typename type> |
205 | void iparse( type &i, const Bu::FString &sBuf ) | 205 | void iparse( type &i, const Bu::FString &sBuf ) |
206 | { | 206 | { |
207 | if( !sBuf ) | 207 | if( !sBuf.isSet() ) |
208 | return; | 208 | return; |
209 | if( sBuf[0] != '+' && sBuf[0] != '-' && | 209 | if( sBuf[0] != '+' && sBuf[0] != '-' && |
210 | (sBuf[0] < '0' && sBuf[0] > '9') ) | 210 | (sBuf[0] < '0' && sBuf[0] > '9') ) |
@@ -230,7 +230,7 @@ namespace Bu | |||
230 | template<typename type> | 230 | template<typename type> |
231 | void uparse( type &i, const Bu::FString &sBuf ) | 231 | void uparse( type &i, const Bu::FString &sBuf ) |
232 | { | 232 | { |
233 | if( !sBuf ) | 233 | if( !sBuf.isSet() ) |
234 | return; | 234 | return; |
235 | if( sBuf[0] != '+' && | 235 | if( sBuf[0] != '+' && |
236 | (sBuf[0] < '0' && sBuf[0] > '9') ) | 236 | (sBuf[0] < '0' && sBuf[0] > '9') ) |