Procházet zdrojové kódy

string.h: bug fix on operator<

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> před 11 roky
rodič
revize
bfe68911d4
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. +6
    -1
      src/lol/base/string.h

+ 6
- 1
src/lol/base/string.h Zobrazit soubor

@@ -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__


Načítá se…
Zrušit
Uložit