Bug 853208 - Fix build break on Gentoo

This commit is contained in:
Alex Xu 2013-06-15 20:44:37 -04:00
parent 25e65a9445
commit cda2e13746
2 changed files with 9 additions and 9 deletions

View File

@ -154,31 +154,31 @@ class StringPiece {
}
};
bool operator==(const StringPiece& x, const StringPiece& y);
bool operator==(const ::StringPiece& x, const ::StringPiece& y);
inline bool operator!=(const StringPiece& x, const StringPiece& y) {
inline bool operator!=(const ::StringPiece& x, const ::StringPiece& y) {
return !(x == y);
}
inline bool operator<(const StringPiece& x, const StringPiece& y) {
const int r = StringPiece::wordmemcmp(x.data(), y.data(),
inline bool operator<(const ::StringPiece& x, const ::StringPiece& y) {
const int r = ::StringPiece::wordmemcmp(x.data(), y.data(),
std::min(x.size(), y.size()));
return ((r < 0) || ((r == 0) && (x.size() < y.size())));
}
inline bool operator>(const StringPiece& x, const StringPiece& y) {
inline bool operator>(const ::StringPiece& x, const ::StringPiece& y) {
return y < x;
}
inline bool operator<=(const StringPiece& x, const StringPiece& y) {
inline bool operator<=(const ::StringPiece& x, const ::StringPiece& y) {
return !(x > y);
}
inline bool operator>=(const StringPiece& x, const StringPiece& y) {
inline bool operator>=(const ::StringPiece& x, const ::StringPiece& y) {
return !(x < y);
}
// allow StringPiece to be logged (needed for unit testing).
extern std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
extern std::ostream& operator<<(std::ostream& o, const ::StringPiece& piece);
#endif // BASE_STRING_PIECE_H_

View File

@ -190,7 +190,7 @@ string16 ASCIIToUTF16(const std::string& ascii);
bool WideToUTF8(const wchar_t* src, size_t src_len, std::string* output);
std::string WideToUTF8(const std::wstring& wide);
bool UTF8ToWide(const char* src, size_t src_len, std::wstring* output);
std::wstring UTF8ToWide(const StringPiece& utf8);
std::wstring UTF8ToWide(const ::StringPiece& utf8);
bool WideToUTF16(const wchar_t* src, size_t src_len, string16* output);
string16 WideToUTF16(const std::wstring& wide);