]> git.saurik.com Git - wxWidgets.git/commitdiff
Change wxLongLongFmtSpec to be a non-wide string.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Nov 2009 14:59:55 +0000 (14:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Nov 2009 14:59:55 +0000 (14:59 +0000)
As with other ANSI/Unicode unification changes, we choose to preserve
compatibility with the existing code using wxLongLongFmtSpec in ANSI build
and require people using it in Unicode build to change their code.

Closes #11372.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/defs.h
include/wx/string.h
samples/console/console.cpp
src/generic/timer.cpp
src/msw/debughlp.cpp
src/propgrid/props.cpp

index 6897d9d4083bb6a5874493f2f4f18bbd2c2b834f..9891632fd542575580cb32db39e5b3fd4036ff02 100644 (file)
@@ -283,6 +283,11 @@ Changes in behaviour which may result in compilation errors
   presence of an element in the list only. If you used it as Find(), simple do
   use Find() instead.
 
+- wxLongLongFmtSpec is now a normal and not wide string so you will need to
+  change expressions of the form wxT("%") wxLongLongFmtSpec wxT("x") to
+  just "%" wxLongLongFmtSpec "x", i.e. simply remove wxT() from the strings you
+  concatenate with it.
+
 
 Deprecated methods and their replacements
 -----------------------------------------
index fd5449895bd3cc960a2a1bb42b54e585785fb997..1155806e240cc5559b06c4a4b13cf988285d7df4 100644 (file)
@@ -978,28 +978,28 @@ typedef wxUint32 wxDword;
 #if (defined(__VISUALC__) && defined(__WIN32__))
     #define wxLongLong_t __int64
     #define wxLongLongSuffix i64
-    #define wxLongLongFmtSpec wxT("I64")
+    #define wxLongLongFmtSpec "I64"
 #elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
     #define wxLongLong_t __int64
     #define wxLongLongSuffix i64
-    #define wxLongLongFmtSpec wxT("L")
+    #define wxLongLongFmtSpec "L"
 #elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__)))
       #define wxLongLong_t __int64
       #define wxLongLongSuffix i64
-      #define wxLongLongFmtSpec wxT("L")
+      #define wxLongLongFmtSpec "L"
 #elif defined(__DIGITALMARS__)
       #define wxLongLong_t __int64
       #define wxLongLongSuffix LL
-      #define wxLongLongFmtSpec wxT("ll")
+      #define wxLongLongFmtSpec "ll"
 #elif defined(__MINGW32__)
     #define wxLongLong_t long long
     #define wxLongLongSuffix ll
-    #define wxLongLongFmtSpec wxT("I64")
+    #define wxLongLongFmtSpec "I64"
 #elif defined(__MWERKS__)
     #if __option(longlong)
         #define wxLongLong_t long long
         #define wxLongLongSuffix ll
-        #define wxLongLongFmtSpec wxT("ll")
+        #define wxLongLongFmtSpec "ll"
     #else
         #error "The 64 bit integer support in CodeWarrior has been disabled."
         #error "See the documentation on the 'longlong' pragma."
@@ -1011,7 +1011,7 @@ typedef wxUint32 wxDword;
         #define wxLongLong_t long long
     #endif /* __WXPALMOS6__ */
     #define wxLongLongSuffix ll
-    #define wxLongLongFmtSpec wxT("ll")
+    #define wxLongLongFmtSpec "ll"
 #elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
     #define wxLongLong_t long long
 #elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8)  || \
@@ -1021,11 +1021,11 @@ typedef wxUint32 wxDword;
         (defined(__DJGPP__) && __DJGPP__ >= 2)
     #define wxLongLong_t long long
     #define wxLongLongSuffix ll
-    #define wxLongLongFmtSpec wxT("ll")
+    #define wxLongLongFmtSpec "ll"
 #elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
     #define wxLongLong_t long
     #define wxLongLongSuffix l
-    #define wxLongLongFmtSpec wxT("l")
+    #define wxLongLongFmtSpec "l"
     #define wxLongLongIsLong
 #endif
 
index 9ab7f3f10a1688e04b67fe46fdce1871ea2c6e88..517abb1185e536c73d5b765365f39c9aca065a3b 100644 (file)
@@ -2071,14 +2071,12 @@ public:
       // insert a long long if they exist and aren't longs
   wxString& operator<<(wxLongLong_t ll)
     {
-      const wxChar *fmt = wxT("%") wxLongLongFmtSpec wxT("d");
-      return (*this) << Format(fmt, ll);
+      return (*this) << Format("%" wxLongLongFmtSpec "d", ll);
     }
       // insert an unsigned long long
   wxString& operator<<(wxULongLong_t ull)
     {
-      const wxChar *fmt = wxT("%") wxLongLongFmtSpec wxT("u");
-      return (*this) << Format(fmt , ull);
+      return (*this) << Format("%" wxLongLongFmtSpec "u" , ull);
     }
 #endif // wxLongLong_t && !wxLongLongIsLong
       // insert a float into string
index e62d060ea7358f4f2668c48c50dd9143595a5206..d043138193077edef90c506f2d6d0194b98b465d 100644 (file)
@@ -1915,7 +1915,7 @@ I am ready for my first lesson today.");
   {
       wxChar buf[200];
 
-      wxSprintf(buf, wxT("%07") wxLongLongFmtSpec wxT("o"), wxLL(040000000000));
+      wxSprintf(buf, "%07" wxLongLongFmtSpec "o", wxLL(040000000000));
       #if 0
         // for some reason below line fails under Borland
       wxPrintf (wxT("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf);
index 00713f32b2ee2f0607a90fe8d7c3726a389fb445..cd39aaac349ce5b15790622b2a50ea78e786180a 100644 (file)
@@ -74,7 +74,7 @@
     typedef wxLongLong wxTimerTick_t;
 
     #if wxUSE_LONGLONG_WX
-        #define wxTimerTickFmtSpec wxLongLongFmtSpec wxT("d")
+        #define wxTimerTickFmtSpec wxLongLongFmtSpec "d"
         #define wxTimerTickPrintfArg(tt) (tt.GetValue())
     #else // using native wxLongLong
         #define wxTimerTickFmtSpec wxT("s")
index c0a0a560d9c479bea244f496477892ad9723d006..f6aff5e53cf242cd4a8405846dcb59749acd6b25 100644 (file)
@@ -281,7 +281,7 @@ wxDbgHelpDLL::DumpBaseType(BasicType bt, DWORD64 length, PVOID pAddress)
         }
         else // opaque 64 bit value
         {
-            s.Printf(wxT("%#" wxLongLongFmtSpec wxT("x")), *(PDWORD *)pAddress);
+            s.Printf("%#" wxLongLongFmtSpec "x", *(PDWORD *)pAddress);
         }
     }
 
index ea01f9b7a2dc1cf796c217db489eb5ebcf3162ca..b727fdb93d44e5d788ba5bbbe0e24496677ec070 100644 (file)
@@ -359,14 +359,14 @@ static const wxChar* gs_uintTemplates32[wxPG_UINT_TEMPLATE_MAX] = {
 };
 
 static const wxChar* gs_uintTemplates64[wxPG_UINT_TEMPLATE_MAX] = {
-    wxT("%") wxLongLongFmtSpec wxT("x"),
-    wxT("0x%") wxLongLongFmtSpec wxT("x"),
-    wxT("$%") wxLongLongFmtSpec wxT("x"),
-    wxT("%") wxLongLongFmtSpec wxT("X"),
-    wxT("0x%") wxLongLongFmtSpec wxT("X"),
-    wxT("$%") wxLongLongFmtSpec wxT("X"),
-    wxT("%") wxLongLongFmtSpec wxT("u"),
-    wxT("%") wxLongLongFmtSpec wxT("o")
+    "%" wxLongLongFmtSpec "x",
+    "0x%" wxLongLongFmtSpec "x",
+    "$%" wxLongLongFmtSpec "x",
+    "%" wxLongLongFmtSpec "X",
+    "0x%" wxLongLongFmtSpec "X",
+    "$%" wxLongLongFmtSpec "X",
+    "%" wxLongLongFmtSpec "u",
+    "%" wxLongLongFmtSpec "o"
 };
 
 WX_PG_IMPLEMENT_PROPERTY_CLASS(wxUIntProperty,wxPGProperty,