X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..refs/heads/master:/icuSources/samples/citer/citer.cpp diff --git a/icuSources/samples/citer/citer.cpp b/icuSources/samples/citer/citer.cpp index c0be60c1..4d5a3bbe 100644 --- a/icuSources/samples/citer/citer.cpp +++ b/icuSources/samples/citer/citer.cpp @@ -1,7 +1,13 @@ /* ******************************************************************************* * -* Copyright (C) 2002-2007, International Business Machines +* © 2016 and later: Unicode, Inc. and others. +* License & terms of use: http://www.unicode.org/copyright.html#License +* +******************************************************************************* +******************************************************************************* +* +* Copyright (C) 2002-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -17,9 +23,14 @@ static UFILE *out; +using icu::CharacterIterator; +using icu::StringCharacterIterator; +using icu::UCharCharacterIterator; +using icu::UnicodeString; + void printUnicodeString(const UnicodeString &s) { - u_fprintf(out, "%S", s); + u_fprintf(out, "%S", &s); } void printUChar(UChar32 ch) @@ -48,7 +59,7 @@ void Test::TestUChariter() { const UChar *testText = testString.getTerminatedBuffer(); UCharCharacterIterator iter(testText, u_strlen(testText)); - UCharCharacterIterator* test2 = (UCharCharacterIterator*)iter.clone(); + UCharCharacterIterator* test2 = iter.clone(); u_fprintf(out, "testText = %s", testChars); @@ -115,7 +126,7 @@ void Test::TestStringiter() { const UChar *testText = testString.getTerminatedBuffer(); StringCharacterIterator iter(testText, u_strlen(testText)); - StringCharacterIterator* test2 = (StringCharacterIterator*)iter.clone(); + StringCharacterIterator* test2 = iter.clone(); if (iter != *test2 ) { u_fprintf(out, "clone() or equals() failed: Two clones tested unequal\n");