]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regex.cpp
Miscellaneous fixes
[libs/core.git] / source / strings / regex.cpp
index 60b8ed10294aa1e83b399cb3605a3ef9750b597b..6122fe40c557c9716cca6e88e7b2926408ad29ef 100644 (file)
@@ -10,7 +10,7 @@ namespace {
 
 /** Writes an integer to a Regex code string, in little-endian order. */
 template<typename T>
-void write_int(T n, Msp::Regex::Code &code)
+void write_int(T n, basic_string<unsigned char> &code)
 {
        for(unsigned i=0; i<sizeof(T); ++i)
                code += (n>>(i*8))&0xFF;
@@ -18,7 +18,7 @@ void write_int(T n, Msp::Regex::Code &code)
 
 /** 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 read_int(basic_string<unsigned char>::const_iterator &c)
 {
        T result = 0;
        for(unsigned i=0; i<sizeof(T); ++i)
@@ -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 first=0, last = 0;
+       unsigned char first = 0, last = 0;
        for(string::const_iterator i=iter; i!=end; ++i)
        {
                unsigned char c = *i;