ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/GStr.cpp
(Generate patch)
# Line 287 | Line 287
287   return (strcmp(chars(), s) != 0);
288   }
289  
290 < GStr& GStr::operator+=(const GStr& s) {
291 < return append((const char *)s);
290 > GStr& GStr::append(char c) {
291 > char buf[5];
292 > sprintf(buf,"%c",c);
293 > return append(buf);
294   }
295  
296 < GStr& GStr::operator+=(const char* s) {
297 < return append(s);
296 > GStr& GStr::append(int i) {
297 > char buf[20];
298 > sprintf(buf,"%d",i);
299 > return append(buf);
300   }
301  
302 < GStr& GStr::operator+=(const char c) {
303 < char buf[4];
304 < sprintf(buf,"%c",c);
302 > GStr& GStr::append(uint i) {
303 > char buf[20];
304 > sprintf(buf,"%u",i);
305   return append(buf);
306   }
307  
308 < GStr& GStr::operator+=(const int i) {
308 > GStr& GStr::append(long l) {
309   char buf[20];
310 < sprintf(buf,"%d",i);
310 > sprintf(buf,"%ld",l);
311   return append(buf);
312   }
313  
314 + GStr& GStr::append(unsigned long l) {
315 + char buf[20];
316 + sprintf(buf,"%lu", l);
317 + return append(buf);
318 + }
319  
320 < GStr& GStr::operator+=(const double f) {
320 > GStr& GStr::append(double f) {
321   char buf[30];
322   sprintf(buf,"%f",f);
323   return append(buf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines