mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-809 small change in const-getBuffer()
X-SVN-Rev: 5888
This commit is contained in:
parent
26f6706273
commit
587f253a41
1 changed files with 4 additions and 4 deletions
|
@ -21,6 +21,7 @@
|
|||
#ifndef UNISTR_H
|
||||
#define UNISTR_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/rep.h"
|
||||
#include "unicode/uchar.h"
|
||||
|
||||
|
@ -2135,9 +2136,8 @@ public:
|
|||
* Get a read-only pointer to the internal buffer.
|
||||
* This can be called at any time on a valid UnicodeString.
|
||||
*
|
||||
* It returns 0 if the string is empty or bogus, or
|
||||
* during an "open" getBuffer(minCapacity)
|
||||
* (at which time the string length is set to 0 anyway).
|
||||
* It returns 0 if the string is bogus, or
|
||||
* during an "open" getBuffer(minCapacity).
|
||||
*
|
||||
* It can be called as many times as desired.
|
||||
* The pointer that it returns will remain valid until the UnicodeString object is modified,
|
||||
|
@ -3339,7 +3339,7 @@ UnicodeString::hashCode() const
|
|||
|
||||
inline const UChar *
|
||||
UnicodeString::getBuffer() const {
|
||||
if(fLength>0) {
|
||||
if(!(fFlags&(kIsBogus|kOpenGetBuffer))) {
|
||||
return fArray;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue