瀏覽代碼

string.h: bug fix on operator<

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> 10 年之前
父節點
當前提交
bfe68911d4
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. +6
    -1
      src/lol/base/string.h

+ 6
- 1
src/lol/base/string.h 查看文件

@@ -279,7 +279,12 @@ public:
inline bool operator <(String const & s) const
{
using namespace std;
return memcmp(C(), s.C(), Count()) < 0;
int res = memcmp(C(), s.C(), Count() < s.Count() ? Count() : s.Count());

if (!res)
return Count() < s.Count();

return res < 0;
}

#ifdef __GNUC__


Loading…
取消
儲存