MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / _load_buffer_WStr

Method _load_buffer_WStr

OgreMain/src/OgreUTFString.cpp:1976–1996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1974 }
1975
1976 void UTFString::_load_buffer_WStr() const
1977 {
1978 _getBufferWStr();
1979 std::wstring &buffer = ( *mBuffer.mWStrBuffer );
1980 buffer.reserve( length() ); // may over reserve, but should be close enough
1981# ifdef WCHAR_UTF16 // wchar_t matches UTF-16
1982 const_iterator i, ie = end();
1983 for( i = begin(); i != ie; ++i )
1984 {
1985 buffer.push_back( (wchar_t)( *i ) );
1986 }
1987# else // wchar_t fits UTF-32
1988 unicode_char c;
1989 const_iterator i, ie = end();
1990 for( i = begin(); i != ie; i.moveNext() )
1991 {
1992 c = i.getCharacter();
1993 buffer.push_back( (wchar_t)c );
1994 }
1995# endif
1996 }
1997
1998 void UTFString::_load_buffer_UTF32() const
1999 {

Callers

nothing calls this directly

Calls 7

endFunction · 0.85
beginFunction · 0.85
moveNextMethod · 0.80
getCharacterMethod · 0.80
lengthFunction · 0.50
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected