]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regex.cpp
Style fix: add whitespace
[libs/core.git] / source / strings / regex.cpp
index 5b047647a1d0b8f9a1b640c63bf2462567503832..67157c9b185e434adf995ec75eeb3f122869ea9a 100644 (file)
@@ -13,16 +13,16 @@ template<typename T>
 void write_int(T n, Msp::Regex::Code &code)
 {
        for(unsigned i=0; i<sizeof(T); ++i)
 void write_int(T n, Msp::Regex::Code &code)
 {
        for(unsigned i=0; i<sizeof(T); ++i)
-               code += (n>>i*8)&0xFF;
+               code += (n>>(i*8))&0xFF;
 }
 
 }
 
-/** Reads an integer from a Regex code stream, in little-endian order. */
+/** Reads an integer from a Regex code string, in little-endian order. */
 template<typename T>
 T read_int(Msp::Regex::Code::const_iterator &c)
 {
        T result = 0;
        for(unsigned i=0; i<sizeof(T); ++i)
 template<typename T>
 T read_int(Msp::Regex::Code::const_iterator &c)
 {
        T result = 0;
        for(unsigned i=0; i<sizeof(T); ++i)
-               result += (*c++)<<i*8;
+               result += (*c++)<<(i*8);
        return result;
 }
 
        return result;
 }
 
@@ -310,7 +310,7 @@ Regex::Code Regex::parse_brackets(const string &str, string::const_iterator &ite
        unsigned char mask[32] = {0};
        unsigned type = 0;
        bool range = false;
        unsigned char mask[32] = {0};
        unsigned type = 0;
        bool range = false;
-       unsigned char first=0, last = 0;
+       unsigned char first = 0, last = 0;
        for(string::const_iterator i=iter; i!=end; ++i)
        {
                unsigned char c = *i;
        for(string::const_iterator i=iter; i!=end; ++i)
        {
                unsigned char c = *i;