aboutsummaryrefslogtreecommitdiff
path: root/src/tafreader.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-26 14:35:22 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-26 14:35:22 +0000
commit1d02c374c8877d430f4ab35a790fc02f02974704 (patch)
tree8d03d2226cc9322262308eba5eb0754d58a71a98 /src/tafreader.cpp
parentb1522d279d22725a731cb8db93ec2d077028374c (diff)
downloadlibbu++-1d02c374c8877d430f4ab35a790fc02f02974704.tar.gz
libbu++-1d02c374c8877d430f4ab35a790fc02f02974704.tar.bz2
libbu++-1d02c374c8877d430f4ab35a790fc02f02974704.tar.xz
libbu++-1d02c374c8877d430f4ab35a790fc02f02974704.zip
Fixed most of the compilation warnings, and a valgrind warning in the fstring's
remove function. memcpy can't do overlapping memory, changed it to use memmove.
Diffstat (limited to 'src/tafreader.cpp')
-rw-r--r--src/tafreader.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/tafreader.cpp b/src/tafreader.cpp
index 012bb32..ca06daf 100644
--- a/src/tafreader.cpp
+++ b/src/tafreader.cpp
@@ -36,20 +36,30 @@ Bu::TafGroup *Bu::TafReader::readGroup()
36 ws(); 36 ws();
37 FString sName = readStr(); 37 FString sName = readStr();
38 TafGroup *pGroup = new TafGroup( sName ); 38 TafGroup *pGroup = new TafGroup( sName );
39 ws(); 39 try
40 if( c != ':' ) 40 {
41 throw TafException("%d:%d: Expected ':' got '%c'.", iLine, iCol, c ); 41 ws();
42 next(); 42 if( c != ':' )
43 //printf("Node[%s]:\n", sName.getStr() ); 43 throw TafException("%d:%d: Expected ':' got '%c'.",
44 iLine, iCol, c );
45 next();
46 //printf("Node[%s]:\n", sName.getStr() );
44 47
45 groupContent( pGroup ); 48 groupContent( pGroup );
46 49
47 if( c != '}' ) 50 if( c != '}' )
48 throw TafException("%d:%d: Expected '}' got '%c'.", iLine, iCol, c ); 51 throw TafException("%d:%d: Expected '}' got '%c'.",
52 iLine, iCol, c );
49 53
50 //next(); 54 //next();
51 55
52 return pGroup; 56 return pGroup;
57 }
58 catch(...)
59 {
60 delete pGroup;
61 throw;
62 }
53} 63}
54 64
55void Bu::TafReader::groupContent( Bu::TafGroup *pGroup ) 65void Bu::TafReader::groupContent( Bu::TafGroup *pGroup )