diff options
author | Mike Buland <eichlan@xagasoft.com> | 2022-04-06 23:45:42 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2022-04-06 23:45:42 -0700 |
commit | 3cbd1038e20dcb2b25db4e74666ec21766642729 (patch) | |
tree | 1fab95855d344196a44feadda75bfc0a5a63b61f /c++-qt/src/boolean.cpp | |
parent | b522669649e81c61c6a5e390991b8fd70bfdeed9 (diff) | |
download | libgats-3cbd1038e20dcb2b25db4e74666ec21766642729.tar.gz libgats-3cbd1038e20dcb2b25db4e74666ec21766642729.tar.bz2 libgats-3cbd1038e20dcb2b25db4e74666ec21766642729.tar.xz libgats-3cbd1038e20dcb2b25db4e74666ec21766642729.zip |
toString works.
It does indent automatically. I figure, you know, if you're converting
to a string then a big part of the reason is so you can read it. In that
case, why make it optional?
Diffstat (limited to '')
-rw-r--r-- | c++-qt/src/boolean.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/c++-qt/src/boolean.cpp b/c++-qt/src/boolean.cpp index bd9bca1..8e7317a 100644 --- a/c++-qt/src/boolean.cpp +++ b/c++-qt/src/boolean.cpp | |||
@@ -40,7 +40,7 @@ void Gats::Boolean::write( QIODevice &rOut ) const | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | void Gats::Boolean::read( QIODevice &rIn, char cType ) | 43 | void Gats::Boolean::read( QIODevice & /*rIn*/, char cType ) |
44 | { | 44 | { |
45 | if( cType == '1' ) | 45 | if( cType == '1' ) |
46 | { | 46 | { |
@@ -51,6 +51,12 @@ void Gats::Boolean::read( QIODevice &rIn, char cType ) | |||
51 | bVal = false; | 51 | bVal = false; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | |||
55 | QString Gats::Boolean::toString( int /*iIndent*/ ) const | ||
56 | { | ||
57 | return bVal?"true":"false"; | ||
58 | } | ||
59 | |||
54 | /* | 60 | /* |
55 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Boolean &b ) | 61 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Boolean &b ) |
56 | { | 62 | { |