]> git.saurik.com Git - wxWidgets.git/commitdiff
no real change; just reordered some implementations before real commit
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 29 Dec 2008 23:21:13 +0000 (23:21 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 29 Dec 2008 23:21:13 +0000 (23:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/utilscmn.cpp

index 85e35c508236ead5b87218ade6eed99fde2c3fa6..f2ad803605b37c70fdb9535a6cc176f291aaffbc 100644 (file)
 
 #if wxUSE_BASE
 
 
 #if wxUSE_BASE
 
-// ----------------------------------------------------------------------------
-// common data
-// ----------------------------------------------------------------------------
-
 // ============================================================================
 // implementation
 // ============================================================================
 // ============================================================================
 // implementation
 // ============================================================================
@@ -125,7 +121,7 @@ int wxHexToDec(const wxString& buf)
     if (buf.GetChar(0) >= wxT('A'))
         firstDigit = buf.GetChar(0) - wxT('A') + 10;
     else
     if (buf.GetChar(0) >= wxT('A'))
         firstDigit = buf.GetChar(0) - wxT('A') + 10;
     else
-       firstDigit = buf.GetChar(0) - wxT('0');
+        firstDigit = buf.GetChar(0) - wxT('0');
 
     if (buf.GetChar(1) >= wxT('A'))
         secondDigit = buf.GetChar(1) - wxT('A') + 10;
 
     if (buf.GetChar(1) >= wxT('A'))
         secondDigit = buf.GetChar(1) - wxT('A') + 10;
@@ -166,6 +162,16 @@ wxString wxDecToHex(int dec)
 // misc functions
 // ----------------------------------------------------------------------------
 
 // misc functions
 // ----------------------------------------------------------------------------
 
+// Don't synthesize KeyUp events holding down a key and producing KeyDown
+// events with autorepeat. On by default and always on in wxMSW. wxGTK version
+// in utilsgtk.cpp.
+#ifndef __WXGTK__
+bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
+{
+    return true;    // detectable auto-repeat is the only mode MSW supports
+}
+#endif // !wxGTK
+
 // Return the current date/time
 wxString wxNow()
 {
 // Return the current date/time
 wxString wxNow()
 {
@@ -224,6 +230,10 @@ bool wxIsPlatformLittleEndian()
 }
 
 
 }
 
 
+// ----------------------------------------------------------------------------
+// wxPlatform
+// ----------------------------------------------------------------------------
+
 /*
  * Class to make it easier to specify platform-dependent values
  */
 /*
  * Class to make it easier to specify platform-dependent values
  */
@@ -644,19 +654,9 @@ long wxExecute(const wxString& command,
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
-// wxApp::Yield() wrappers for backwards compatibility
+// Id functions
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 
-bool wxYield()
-{
-    return wxTheApp && wxTheApp->Yield();
-}
-
-bool wxYieldIfNeeded()
-{
-    return wxTheApp && wxTheApp->Yield(true);
-}
-
 // Id generation
 static long wxCurrentId = 100;
 
 // Id generation
 static long wxCurrentId = 100;
 
@@ -710,16 +710,16 @@ Thanks,
 
 /* Byte-wise swap two items of size SIZE. */
 #define SWAP(a, b, size)                                                      \
 
 /* Byte-wise swap two items of size SIZE. */
 #define SWAP(a, b, size)                                                      \
-  do                                                                              \
-    {                                                                              \
-      register size_t __size = (size);                                              \
-      register char *__a = (a), *__b = (b);                                      \
+  do                                                                          \
+    {                                                                         \
+      register size_t __size = (size);                                        \
+      register char *__a = (a), *__b = (b);                                   \
       do                                                                      \
       do                                                                      \
-        {                                                                      \
-          char __tmp = *__a;                                                      \
+        {                                                                     \
+          char __tmp = *__a;                                                  \
           *__a++ = *__b;                                                      \
           *__a++ = *__b;                                                      \
-          *__b++ = __tmp;                                                      \
-        } while (--__size > 0);                                                      \
+          *__b++ = __tmp;                                                     \
+        } while (--__size > 0);                                               \
     } while (0)
 
 /* Discontinue quicksort algorithm when partition gets below this size.
     } while (0)
 
 /* Discontinue quicksort algorithm when partition gets below this size.
@@ -922,9 +922,9 @@ void wxQsort(void *const pbase, size_t total_elems,
   }
 }
 
   }
 }
 
+#endif // wxUSE_BASE
 
 
 
 
-#endif // wxUSE_BASE
 
 // ============================================================================
 // GUI-only functions from now on
 
 // ============================================================================
 // GUI-only functions from now on
@@ -1680,14 +1680,18 @@ bool wxSafeYield(wxWindow *win, bool onlyIfNeeded)
     return rc;
 }
 
     return rc;
 }
 
-// Don't synthesize KeyUp events holding down a key and producing KeyDown
-// events with autorepeat. On by default and always on in wxMSW. wxGTK version
-// in utilsgtk.cpp.
-#ifndef __WXGTK__
-bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
+// ----------------------------------------------------------------------------
+// wxApp::Yield() wrappers for backwards compatibility
+// ----------------------------------------------------------------------------
+
+bool wxYield()
 {
 {
-    return true;    // detectable auto-repeat is the only mode MSW supports
+    return wxTheApp && wxTheApp->Yield();
+}
+
+bool wxYieldIfNeeded()
+{
+    return wxTheApp && wxTheApp->Yield(true);
 }
 }
-#endif // !wxGTK
 
 #endif // wxUSE_GUI
 
 #endif // wxUSE_GUI