diff options
author | Brad Davis <[email protected]> | 2014-01-10 18:02:40 -0800 |
---|---|---|
committer | Brad Davis <[email protected]> | 2014-01-10 18:02:40 -0800 |
commit | f28388ff2af14b56ef2d973b2f4f9da021716d4c (patch) | |
tree | dcfcb263eb87741878b6b323bfa50e1dcdc0ba1b /LibOVR/Src/Kernel/OVR_String.h | |
parent | cdc395e194dcc287ec3749908b8e77b2499dd675 (diff) |
Updating to 0.2.5c
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_String.h')
-rw-r--r-- | LibOVR/Src/Kernel/OVR_String.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/LibOVR/Src/Kernel/OVR_String.h b/LibOVR/Src/Kernel/OVR_String.h index 794990f..6c09178 100644 --- a/LibOVR/Src/Kernel/OVR_String.h +++ b/LibOVR/Src/Kernel/OVR_String.h @@ -7,12 +7,23 @@ Content : String UTF8 string implementation with copy-on-write semantics Created : September 19, 2012 Notes : -Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved. -Use of this software is subject to the terms of the Oculus license -agreement provided at the time of installation or download, or which +Licensed under the Oculus VR SDK License Version 2.0 (the "License"); +you may not use the Oculus VR SDK except in compliance with the License, +which is provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. +You may obtain a copy of the License at + +http://www.oculusvr.com/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, the Oculus VR SDK +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + ************************************************************************************/ #ifndef OVR_String_h @@ -225,7 +236,7 @@ public: // String& Insert(const UInt32* substr, UPInt posAt, SPInt size = -1); // Get Byte index of the character at position = index - UPInt GetByteIndex(UPInt index) const { return (UPInt)UTF8Util::GetByteIndex(index, GetData()->Data); } + UPInt GetByteIndex(UPInt index) const { return (UPInt)UTF8Util::GetByteIndex(static_cast<SPInt>(index), GetData()->Data); } // Utility: case-insensitive string compare. stricmp() & strnicmp() are not // ANSI or POSIX, do not seem to appear in Linux. @@ -275,7 +286,7 @@ public: void operator += (const String& src); void operator += (const char* psrc) { AppendString(psrc); } void operator += (const wchar_t* psrc) { AppendString(psrc); } - void operator += (char ch) { AppendChar(ch); } + void operator += (char ch) { AppendChar( static_cast<UInt32>(ch) ); } String operator + (const char* str) const; String operator + (const String& src) const; @@ -465,10 +476,10 @@ public: void operator = (const String& src); // Addition - void operator += (const String& src) { AppendString(src.ToCStr(),src.GetSize()); } + void operator += (const String& src) { AppendString(src.ToCStr(),static_cast<SPInt>(src.GetSize())); } void operator += (const char* psrc) { AppendString(psrc); } void operator += (const wchar_t* psrc) { AppendString(psrc); } - void operator += (char ch) { AppendChar(ch); } + void operator += (char ch) { AppendChar( static_cast<SPInt>(ch) ); } //String operator + (const char* str) const ; //String operator + (const String& src) const ; |