X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbinarywriter.cpp;h=c1e53fb5f23e7ca3622697c4e5e829383aeafd2f;hb=5fd2c13c3036ea6a767802fdc9a2ab809ef8ec17;hp=a8306c2cfd8eb98a6d5e14aac5358c742e0d4e44;hpb=6f94aaece716a31e75166e261cc47579288892b4;p=libs%2Fdatafile.git diff --git a/source/binarywriter.cpp b/source/binarywriter.cpp index a8306c2..c1e53fb 100644 --- a/source/binarywriter.cpp +++ b/source/binarywriter.cpp @@ -89,9 +89,9 @@ void BinaryWriter::collect_keywords(const Statement &st) collect_keywords(*i); } -void BinaryWriter::write_int(long long n) +void BinaryWriter::write_int(IntType::Store n) { - unsigned i = sizeof(long long)-1; + unsigned i = sizeof(IntType::Store)-1; if(n>=0) for(; (i>0 && (n>>(i*7-1))==0); --i) ; @@ -102,7 +102,7 @@ void BinaryWriter::write_int(long long n) out.put((n>>(i*7) & 0x7F) | (i?0x80:0)); } -void BinaryWriter::write_string(const string &s) +void BinaryWriter::write_string(const StringType::Store &s) { StringMap::const_iterator i = strings.find(s); if(i!=strings.end()) @@ -114,7 +114,7 @@ void BinaryWriter::write_string(const string &s) } } -void BinaryWriter::write_float(float f) +void BinaryWriter::write_float(FloatType::Store f) { union { @@ -132,7 +132,7 @@ void BinaryWriter::write_float(float f) #endif } -void BinaryWriter::write_symbol(const Symbol &s) +void BinaryWriter::write_symbol(const SymbolType::Store &s) { write_int(get_item(strings, s.name)); }