X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/io/ustream.cpp?ds=sidebyside diff --git a/icuSources/io/ustream.cpp b/icuSources/io/ustream.cpp index fb5f8880..25c54eb5 100644 --- a/icuSources/io/ustream.cpp +++ b/icuSources/io/ustream.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2011, International Business Machines +* Copyright (C) 2001-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * FILE NAME : ustream.cpp @@ -13,6 +13,9 @@ */ #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/uobject.h" #include "unicode/ustream.h" #include "unicode/ucnv.h" @@ -85,7 +88,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str) converter = u_getDefaultConverter(&errorCode); if(U_SUCCESS(errorCode)) { UChar *us = uBuffer; - const UChar *uLimit = uBuffer + sizeof(uBuffer)/sizeof(*uBuffer); + const UChar *uLimit = uBuffer + UPRV_LENGTHOF(uBuffer); const char *s, *sLimit; char ch; UChar ch32; @@ -165,3 +168,4 @@ STOP_READING: U_NAMESPACE_END #endif +#endif