[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/kernel
From:       David Faure <faure () kde ! org>
Date:       2010-11-16 11:10:09
Message-ID: 20101116111009.D6BC7AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1197667 by dfaure:

Coding style; remove unused value from internal tokenize function.


 M  +7 -14     kstandarddirs.cpp  


--- trunk/KDE/kdelibs/kdecore/kernel/kstandarddirs.cpp #1197666:1197667
@@ -231,7 +231,7 @@
     517,  530,  536,  554,  -1
 };
 
-static int tokenize( QStringList& token, const QString& str,
+static void tokenize(QStringList& token, const QString& str,
                      const QString& delim );
 
 KStandardDirs::KStandardDirs()
@@ -1434,30 +1434,23 @@
         return str;
 }
 
-static int tokenize( QStringList& tokens, const QString& str,
+static void tokenize(QStringList& tokens, const QString& str,
                      const QString& delim )
 {
-    int len = str.length();
+    const int len = str.length();
     QString token;
 
-    for( int index = 0; index < len; index++)
-    {
-        if ( delim.contains( str[ index ] ) )
-        {
+    for(int index = 0; index < len; index++) {
+        if (delim.contains(str[index])) {
             tokens.append( equalizePath(token) );
             token.clear();
-        }
-        else
-        {
+        } else {
             token += str[ index ];
         }
     }
-    if ( !token.isEmpty() )
-    {
+    if (!token.isEmpty()) {
         tokens.append( equalizePath(token) );
     }
-
-    return tokens.count();
 }
 
 #ifndef KDE_NO_DEPRECATED
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic