Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2182)

Unified Diff: source/common/unicode/char16ptr.h

Issue 314660043: ticket:12766 Escaping source code (Closed) Base URL: svn+ssh://source.icu-project.org/repos/icu/trunk/icu4c/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: source/common/unicode/char16ptr.h
===================================================================
--- source/common/unicode/char16ptr.h (revision 39836)
+++ source/common/unicode/char16ptr.h (working copy)
@@ -42,6 +42,7 @@
* @draft ICU 59
*/
inline Char16Ptr(char16_t *p);
+#if !U_CHAR16_IS_TYPEDEF
/**
* Converts the pointer to char16_t *.
* @param p pointer to be converted
@@ -48,6 +49,7 @@
* @draft ICU 59
*/
inline Char16Ptr(uint16_t *p);
+#endif
#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN)
/**
* Converts the pointer to char16_t *.
@@ -104,7 +106,9 @@
#ifdef U_ALIASING_BARRIER
Char16Ptr::Char16Ptr(char16_t *p) : p(p) {}
+#if !U_CHAR16_IS_TYPEDEF
Char16Ptr::Char16Ptr(uint16_t *p) : p(cast(p)) {}
+#endif
#if U_SIZEOF_WCHAR_T==2
Char16Ptr::Char16Ptr(wchar_t *p) : p(cast(p)) {}
#endif
@@ -118,7 +122,9 @@
#else
Char16Ptr::Char16Ptr(char16_t *p) { u.cp = p; }
+#if !U_CHAR16_IS_TYPEDEF
Char16Ptr::Char16Ptr(uint16_t *p) { u.up = p; }
+#endif
#if U_SIZEOF_WCHAR_T==2
Char16Ptr::Char16Ptr(wchar_t *p) { u.wp = p; }
#endif
@@ -141,6 +147,7 @@
* @draft ICU 59
*/
inline ConstChar16Ptr(const char16_t *p);
+#if !U_CHAR16_IS_TYPEDEF
/**
* Converts the pointer to char16_t *.
* @param p pointer to be converted
@@ -147,6 +154,7 @@
* @draft ICU 59
*/
inline ConstChar16Ptr(const uint16_t *p);
+#endif
#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN)
/**
* Converts the pointer to char16_t *.
@@ -162,6 +170,7 @@
* @draft ICU 59
*/
inline ConstChar16Ptr(const std::nullptr_t p);
+
/**
* Destructor.
* @draft ICU 59
@@ -203,7 +212,9 @@
#ifdef U_ALIASING_BARRIER
ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p(p) {}
+#if !U_CHAR16_IS_TYPEDEF
ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) : p(cast(p)) {}
+#endif
#if U_SIZEOF_WCHAR_T==2
ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) : p(cast(p)) {}
#endif
@@ -217,7 +228,9 @@
#else
ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) { u.cp = p; }
+#if !U_CHAR16_IS_TYPEDEF
ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) { u.up = p; }
+#endif
#if U_SIZEOF_WCHAR_T==2
ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) { u.wp = p; }
#endif

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b