From 08576b49c8bfb6cd841724dc5124d40af9475eb8 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 8 Jun 2008 15:58:44 +0000 Subject: [PATCH] Fix gcc 4.3 style warnings --- source/binaryparser.cpp | 2 +- source/binarywriter.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/binaryparser.cpp b/source/binaryparser.cpp index ba6414b..b55c7af 100644 --- a/source/binaryparser.cpp +++ b/source/binaryparser.cpp @@ -110,7 +110,7 @@ long long BinaryParser::parse_int() { int c=in.get(); - result=result<<7 | c&0x7F; + result=(result<<7) | (c&0x7F); bits+=7; if(!(c&0x80)) diff --git a/source/binarywriter.cpp b/source/binarywriter.cpp index 4fc35c0..dd63d3d 100644 --- a/source/binarywriter.cpp +++ b/source/binarywriter.cpp @@ -102,12 +102,12 @@ void BinaryWriter::write_int(long long n) unsigned i=sizeof(long long)-1; if(n>=0) - for(; (i>0 && (n>>(i*7-1))==0); --i); + for(; (i>0 && (n>>(i*7-1))==0); --i) ; else - for(; (i>0 && (n>>(i*7-1))==-1); --i); + for(; (i>0 && (n>>(i*7-1))==-1); --i) ; for(++i; i--;) - out.put(n>>(i*7) & 0x7F | (i?0x80:0)); + out.put((n>>(i*7) & 0x7F) | (i?0x80:0)); } void BinaryWriter::write_string(const string &s) -- 2.45.2