diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-08-10 10:21:53 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-08-10 10:21:53 -0700 |
commit | f5e3af905e1c37d53d1a0d7de1c3d457dd4cb632 (patch) | |
tree | af08a73de8623aa64f951f98fa65a9d039254e4f /src | |
parent | 23b59719e9fdb09f012372d28a6953971ec9835c (diff) | |
download | vyatta-wanloadbalance-f5e3af905e1c37d53d1a0d7de1c3d457dd4cb632.tar.gz vyatta-wanloadbalance-f5e3af905e1c37d53d1a0d7de1c3d457dd4cb632.zip |
fix for bug 6019
* fix 64-bit problem: string::find*() functions have return type of "size_t", not "uint32_t".
Diffstat (limited to 'src')
-rw-r--r-- | src/rl_str_proc.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rl_str_proc.cc b/src/rl_str_proc.cc index 3a5d151..317efab 100644 --- a/src/rl_str_proc.cc +++ b/src/rl_str_proc.cc @@ -10,7 +10,7 @@ StrProc::StrProc(const string &in_str, const string &token) string tmp = in_str; //convert tabs to spaces - uint32_t pos = 0; + size_t pos = 0; string tabtospace = " "; string::iterator iter = tmp.begin(); while ((pos = tmp.find("\t", pos)) != string::npos) { @@ -26,7 +26,7 @@ StrProc::StrProc(const string &in_str, const string &token) //now handle the case of the multiple length token //note that we are using the '~' as a token internally - uint32_t start = 0, end; + size_t start = 0, end; while ((start = tmp.find(token, start)) != string::npos) { tmp.replace(start, token.length(), "~"); } @@ -49,6 +49,7 @@ StrProc::StrProc(const string &in_str, const string &token) string StrProc::get(int i) { + /* uint32_t probably ok here */ if (uint32_t(i) >= _str_coll.size()) { return string(""); } @@ -61,11 +62,13 @@ StrProc::get(int i) string StrProc::get(int start, int end) { + /* uint32_t probably ok here */ if (uint32_t(start) >= _str_coll.size()) { return string(""); } string tmp; + /* uint32_t probably ok here */ for (int i = start; (i < end) && (uint32_t(i) < _str_coll.size()); ++i) { tmp += _str_coll[i] + " "; } |