ICU-9317 Add icu:: to ambiguous uses of StringPiece.
X-SVN-Rev: 31818
This commit is contained in:
parent
49ab350c8a
commit
402b732faf
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* Copyright (C) 2010-2011, International Business Machines
|
* Copyright (C) 2010-2012, International Business Machines
|
||||||
* Corporation and others. All Rights Reserved.
|
* Corporation and others. All Rights Reserved.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* file name: uts46.cpp
|
* file name: uts46.cpp
|
||||||
@ -1402,7 +1402,10 @@ uidna_labelToASCII_UTF8(const UIDNA *idna,
|
|||||||
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
|
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
StringPiece src(label, length<0 ? uprv_strlen(label) : length);
|
// Note: StringPiece is explicitly qualified because in some build environments there
|
||||||
|
// exists a separate, non-ICU global ::StringPiece class that causes ambiguity.
|
||||||
|
// This is needed for all uses of StringPiece outside of U_NAMESPACE_BEGIN ... U_NAMESPACE_END.
|
||||||
|
icu::StringPiece src(label, length<0 ? uprv_strlen(label) : length);
|
||||||
CheckedArrayByteSink sink(dest, capacity);
|
CheckedArrayByteSink sink(dest, capacity);
|
||||||
IDNAInfo info;
|
IDNAInfo info;
|
||||||
reinterpret_cast<const IDNA *>(idna)->labelToASCII_UTF8(src, sink, info, *pErrorCode);
|
reinterpret_cast<const IDNA *>(idna)->labelToASCII_UTF8(src, sink, info, *pErrorCode);
|
||||||
@ -1418,7 +1421,7 @@ uidna_labelToUnicodeUTF8(const UIDNA *idna,
|
|||||||
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
|
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
StringPiece src(label, length<0 ? uprv_strlen(label) : length);
|
icu::StringPiece src(label, length<0 ? uprv_strlen(label) : length);
|
||||||
CheckedArrayByteSink sink(dest, capacity);
|
CheckedArrayByteSink sink(dest, capacity);
|
||||||
IDNAInfo info;
|
IDNAInfo info;
|
||||||
reinterpret_cast<const IDNA *>(idna)->labelToUnicodeUTF8(src, sink, info, *pErrorCode);
|
reinterpret_cast<const IDNA *>(idna)->labelToUnicodeUTF8(src, sink, info, *pErrorCode);
|
||||||
@ -1434,7 +1437,7 @@ uidna_nameToASCII_UTF8(const UIDNA *idna,
|
|||||||
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
|
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
StringPiece src(name, length<0 ? uprv_strlen(name) : length);
|
icu::StringPiece src(name, length<0 ? uprv_strlen(name) : length);
|
||||||
CheckedArrayByteSink sink(dest, capacity);
|
CheckedArrayByteSink sink(dest, capacity);
|
||||||
IDNAInfo info;
|
IDNAInfo info;
|
||||||
reinterpret_cast<const IDNA *>(idna)->nameToASCII_UTF8(src, sink, info, *pErrorCode);
|
reinterpret_cast<const IDNA *>(idna)->nameToASCII_UTF8(src, sink, info, *pErrorCode);
|
||||||
@ -1450,7 +1453,7 @@ uidna_nameToUnicodeUTF8(const UIDNA *idna,
|
|||||||
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
|
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
StringPiece src(name, length<0 ? uprv_strlen(name) : length);
|
icu::StringPiece src(name, length<0 ? uprv_strlen(name) : length);
|
||||||
CheckedArrayByteSink sink(dest, capacity);
|
CheckedArrayByteSink sink(dest, capacity);
|
||||||
IDNAInfo info;
|
IDNAInfo info;
|
||||||
reinterpret_cast<const IDNA *>(idna)->nameToUnicodeUTF8(src, sink, info, *pErrorCode);
|
reinterpret_cast<const IDNA *>(idna)->nameToUnicodeUTF8(src, sink, info, *pErrorCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user