Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: core/include/fxcrt/fx_string.h

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxcrt/fx_stream.h ('k') | core/include/fxcrt/fx_system.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FXCRT_FX_STRING_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_STRING_H_
8 #define CORE_INCLUDE_FXCRT_FX_STRING_H_ 8 #define CORE_INCLUDE_FXCRT_FX_STRING_H_
9 9
10 #include <stdint.h> // For intptr_t. 10 #include <stdint.h> // For intptr_t.
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 // Implicit conversion to C-style wide string -- deprecated 664 // Implicit conversion to C-style wide string -- deprecated
665 operator const FX_WCHAR*() const 665 operator const FX_WCHAR*() const
666 { 666 {
667 return m_pData ? m_pData->m_String : L""; 667 return m_pData ? m_pData->m_String : L"";
668 } 668 }
669 669
670 void Empty(); 670 void Empty();
671 671
672 672
673 FX_BOOL» » » » » IsEmpty() const 673 bool» » » » » IsEmpty() const
674 { 674 {
675 return !GetLength(); 675 return !GetLength();
676 } 676 }
677 677
678 FX_STRSIZE GetLength() const 678 FX_STRSIZE GetLength() const
679 { 679 {
680 return m_pData ? m_pData->m_nDataLength : 0; 680 return m_pData ? m_pData->m_nDataLength : 0;
681 } 681 }
682 682
683 const CFX_WideString& operator = (const FX_WCHAR* str); 683 const CFX_WideString& operator = (const FX_WCHAR* str);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 inline bool operator== (const CFX_WideStringC& lhs, const CFX_WideString& rhs) { 888 inline bool operator== (const CFX_WideStringC& lhs, const CFX_WideString& rhs) {
889 return rhs == lhs; 889 return rhs == lhs;
890 } 890 }
891 inline bool operator!= (const wchar_t* lhs, const CFX_WideString& rhs) { 891 inline bool operator!= (const wchar_t* lhs, const CFX_WideString& rhs) {
892 return rhs != lhs; 892 return rhs != lhs;
893 } 893 }
894 inline bool operator!= (const CFX_WideStringC& lhs, const CFX_WideString& rhs) { 894 inline bool operator!= (const CFX_WideStringC& lhs, const CFX_WideString& rhs) {
895 return rhs != lhs; 895 return rhs != lhs;
896 } 896 }
897 FX_FLOAT FX_atof(const CFX_ByteStringC& str); 897 FX_FLOAT FX_atof(const CFX_ByteStringC& str);
898 void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData); 898 void FX_atonum(const CFX_ByteStringC& str, bool& bInteger, void* pData);
899 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf); 899 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
900 CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len); 900 CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len);
901 inline CFX_ByteString FX_UTF8Encode(const CFX_WideStringC& wsStr) 901 inline CFX_ByteString FX_UTF8Encode(const CFX_WideStringC& wsStr)
902 { 902 {
903 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); 903 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength());
904 } 904 }
905 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) 905 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr)
906 { 906 {
907 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength()); 907 return FX_UTF8Encode(wsStr.c_str(), wsStr.GetLength());
908 } 908 }
909 909
910 #endif // CORE_INCLUDE_FXCRT_FX_STRING_H_ 910 #endif // CORE_INCLUDE_FXCRT_FX_STRING_H_
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_stream.h ('k') | core/include/fxcrt/fx_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698