aboutsummaryrefslogtreecommitdiff
path: root/src/serializertext.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-11-21 20:26:23 +0000
committerMike Buland <eichlan@xagasoft.com>2006-11-21 20:26:23 +0000
commit8fbf5fda24392d2a2ee19d6f40699a5de29da662 (patch)
treeac79c447bc4897d8cc350068504f184fdb8e4cfa /src/serializertext.cpp
parent2bb05378f31311c353d43688fa753822ab9a6461 (diff)
downloadlibbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.gz
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.bz2
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.xz
libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.zip
Everything in libbu++ now passes -Wall, this should have been done a long time
ago.
Diffstat (limited to 'src/serializertext.cpp')
-rw-r--r--src/serializertext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/serializertext.cpp b/src/serializertext.cpp
index 2933e86..f758bf8 100644
--- a/src/serializertext.cpp
+++ b/src/serializertext.cpp
@@ -64,7 +64,7 @@ Serializer &SerializerText::operator<<(int16_t p)
64} 64}
65Serializer &SerializerText::operator<<(int32_t p) 65Serializer &SerializerText::operator<<(int32_t p)
66{ 66{
67 fprintf(fhFile, "%ld\n", p); 67 fprintf(fhFile, "%d\n", p);
68 return *this; 68 return *this;
69} 69}
70Serializer &SerializerText::operator<<(int64_t p) 70Serializer &SerializerText::operator<<(int64_t p)
@@ -84,7 +84,7 @@ Serializer &SerializerText::operator<<(uint16_t p)
84} 84}
85Serializer &SerializerText::operator<<(uint32_t p) 85Serializer &SerializerText::operator<<(uint32_t p)
86{ 86{
87 fprintf(fhFile, "%lu\n", p); 87 fprintf(fhFile, "%u\n", p);
88 return *this; 88 return *this;
89} 89}
90Serializer &SerializerText::operator<<(uint64_t p) 90Serializer &SerializerText::operator<<(uint64_t p)
@@ -110,7 +110,7 @@ Serializer &SerializerText::operator<<(long double p)
110 110
111Serializer &SerializerText::operator>>(bool &p) 111Serializer &SerializerText::operator>>(bool &p)
112{ 112{
113 fscanf(fhFile, "%hhd\n", &p); 113 fscanf(fhFile, "%hhd\n", ((signed char *)&p));
114 return *this; 114 return *this;
115} 115}
116Serializer &SerializerText::operator>>(int8_t &p) 116Serializer &SerializerText::operator>>(int8_t &p)
@@ -125,7 +125,7 @@ Serializer &SerializerText::operator>>(int16_t &p)
125} 125}
126Serializer &SerializerText::operator>>(int32_t &p) 126Serializer &SerializerText::operator>>(int32_t &p)
127{ 127{
128 fscanf(fhFile, "%ld\n", &p); 128 fscanf(fhFile, "%d\n", &p);
129 return *this; 129 return *this;
130} 130}
131Serializer &SerializerText::operator>>(int64_t &p) 131Serializer &SerializerText::operator>>(int64_t &p)
@@ -145,7 +145,7 @@ Serializer &SerializerText::operator>>(uint16_t &p)
145} 145}
146Serializer &SerializerText::operator>>(uint32_t &p) 146Serializer &SerializerText::operator>>(uint32_t &p)
147{ 147{
148 fscanf(fhFile, "%lu\n", &p); 148 fscanf(fhFile, "%u\n", &p);
149 return *this; 149 return *this;
150} 150}
151Serializer &SerializerText::operator>>(uint64_t &p) 151Serializer &SerializerText::operator>>(uint64_t &p)
@@ -160,7 +160,7 @@ Serializer &SerializerText::operator>>(float &p)
160} 160}
161Serializer &SerializerText::operator>>(double &p) 161Serializer &SerializerText::operator>>(double &p)
162{ 162{
163 fscanf(fhFile, "%f\n", &p); 163 fscanf(fhFile, "%lf\n", &p);
164 return *this; 164 return *this;
165} 165}
166Serializer &SerializerText::operator>>(long double &p) 166Serializer &SerializerText::operator>>(long double &p)