X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..6be67b064733ad8f9e904623c29984bb874c1e0c:/icuSources/common/bmpset.cpp?ds=sidebyside diff --git a/icuSources/common/bmpset.cpp b/icuSources/common/bmpset.cpp index db87c705..08f9bed0 100644 --- a/icuSources/common/bmpset.cpp +++ b/icuSources/common/bmpset.cpp @@ -1,12 +1,14 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * -* Copyright (C) 2007-2008, International Business Machines +* Copyright (C) 2007-2012, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * file name: bmpset.cpp -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -16,8 +18,11 @@ #include "unicode/utypes.h" #include "unicode/uniset.h" +#include "unicode/utf8.h" +#include "unicode/utf16.h" #include "cmemory.h" #include "bmpset.h" +#include "uassert.h" U_NAMESPACE_BEGIN @@ -61,8 +66,11 @@ BMPSet::~BMPSet() { * start>6; - int32_t trail=start&0x3f; + U_ASSERT(start>6; // Named for UTF-8 2-byte lead byte with upper 5 bits. + int32_t trail=start&0x3f; // Named for UTF-8 2-byte trail byte with lower 6 bits. // Set one bit indicating an all-one block. uint32_t bits=(uint32_t)1<>6)))!=0) != spanCondition) {