[haiku-commits] haiku: hrev47563 - in src: servers/cddb_daemon apps/aboutsystem

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 24 Jul 2014 09:46:49 +0200 (CEST)

hrev47563 adds 2 changesets to branch 'master'
old head: 18eae6381e1d6a34ab13f4433841da5f42443deb
new head: 5f22a181ecdffd85b07ecfd5015e4b3012dbdc81
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5f22a18+%5E18eae63

----------------------------------------------------------------------------

ca38bad: Missing parenthesis.

5f22a18: Simplify code using BString features.
  
  * No functional changes
  * Why do in 10 lines what can be done in 1?

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 3 insertions(+), 10 deletions(-)
src/apps/aboutsystem/Credits.h          |  2 +-
src/servers/cddb_daemon/cddb_daemon.cpp | 11 ++---------

############################################################################

Commit:      ca38bad855ed8c1bc8b83598a2dd98f7a2909a45
URL:         http://cgit.haiku-os.org/haiku/commit/?id=ca38bad
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Thu Jul 24 07:26:09 2014 UTC

Missing parenthesis.

----------------------------------------------------------------------------

diff --git a/src/apps/aboutsystem/Credits.h b/src/apps/aboutsystem/Credits.h
index 67f4796..df28c37 100644
--- a/src/apps/aboutsystem/Credits.h
+++ b/src/apps/aboutsystem/Credits.h
@@ -67,7 +67,7 @@ static const Translation kTranslations[] = {
                "C├ęsar Ortiz Pantoja (ccortiz)\n"
        },
        { "fi",
-               "Jorma Karvonen (Karvjorm\n"
+               "Jorma Karvonen (Karvjorm)\n"
                "Jaakko Leikas (Garjala)\n"
                "Slavi Stefanov Sotirov\n"
        },

############################################################################

Revision:    hrev47563
Commit:      5f22a181ecdffd85b07ecfd5015e4b3012dbdc81
URL:         http://cgit.haiku-os.org/haiku/commit/?id=5f22a18
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Thu Jul 24 07:29:56 2014 UTC

Simplify code using BString features.

* No functional changes
* Why do in 10 lines what can be done in 1?

----------------------------------------------------------------------------

diff --git a/src/servers/cddb_daemon/cddb_daemon.cpp 
b/src/servers/cddb_daemon/cddb_daemon.cpp
index f6875bd..c9ac1d8 100644
--- a/src/servers/cddb_daemon/cddb_daemon.cpp
+++ b/src/servers/cddb_daemon/cddb_daemon.cpp
@@ -233,16 +233,9 @@ CDDBDaemon::_WriteCDData(dev_t device, QueryResponseData* 
diskData,
                TrackData* data = 
(TrackData*)((readResponse->tracks).ItemAt(index));
                
                // Update name.
-               name = data->title;
-               name.ReplaceSet("/", " ");
-               
-               // Add track number to the beginning of the string.
                int trackNum = index + 1; // index=0 is actually Track 1
-               char trackNumString[3]; // 2 digits + '\0'
-               snprintf(trackNumString, sizeof(trackNumString), "%02d", 
trackNum);
-               name.Prepend(" ");
-               name.Prepend(trackNumString, sizeof(trackNumString));
-               name.Append(".wav");
+               name.SetToFormat("%02d %s.wav", trackNum, data->title.String());
+               name.ReplaceSet("/", " ");
 
                if ((result = entry.Rename(name.String())) != B_OK) {
                        printf("Failed renaming entry at index %d to 
\"%s\".\n", index,


Other related posts:

  • » [haiku-commits] haiku: hrev47563 - in src: servers/cddb_daemon apps/aboutsystem - pulkomandy