[haiku-commits] r40756 - in haiku/trunk: headers/os/support src/kits/support

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 1 Mar 2011 09:26:01 +0100 (CET)

Author: kirilla
Date: 2011-03-01 09:26:00 +0100 (Tue, 01 Mar 2011)
New Revision: 40756
Changeset: http://dev.haiku-os.org/changeset/40756

Modified:
   haiku/trunk/headers/os/support/String.h
   haiku/trunk/src/kits/support/String.cpp
Log:
Rename and a small simplification. Thanks, Clemens and Ingo.

Modified: haiku/trunk/headers/os/support/String.h
===================================================================
--- haiku/trunk/headers/os/support/String.h     2011-03-01 05:22:33 UTC (rev 
40755)
+++ haiku/trunk/headers/os/support/String.h     2011-03-01 08:26:00 UTC (rev 
40756)
@@ -49,7 +49,7 @@
                        BString&                SetToChars(const BString& 
string, int32 charCount);
                        BString&                AdoptChars(BString& from, int32 
charCount);
                        
-                       BString&                SetToArguments(const char* 
format, ...);
+                       BString&                SetToFormat(const char* format, 
...);
 
                        // Substring copying
                        BString&                CopyInto(BString& into, int32 
fromOffset,

Modified: haiku/trunk/src/kits/support/String.cpp
===================================================================
--- haiku/trunk/src/kits/support/String.cpp     2011-03-01 05:22:33 UTC (rev 
40755)
+++ haiku/trunk/src/kits/support/String.cpp     2011-03-01 08:26:00 UTC (rev 
40756)
@@ -425,7 +425,7 @@
 
 
 BString&
-BString::SetToArguments(const char* format, ...)
+BString::SetToFormat(const char* format, ...)
 {
        va_list arg;
        va_start(arg, format);
@@ -433,7 +433,8 @@
        va_end(arg);
        
        if (bytes <= Length()) {
-               bytes = bytes < 0 ? 0 : bytes;
+               if (bytes < 0)
+                       bytes = 0;
                UnlockBuffer(bytes);
        } else {
                va_list arg2;


Other related posts:

  • » [haiku-commits] r40756 - in haiku/trunk: headers/os/support src/kits/support - jonas