mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 853208 - Fix build break on Gentoo
This commit is contained in:
parent
25e65a9445
commit
cda2e13746
@ -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_
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user