[Pkg-owncloud-commits] [owncloud-client] 16/164: Fix compilation with clang

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Mar 22 11:55:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit d43b82dc82b8226d0eea76c6e86f65c163345973
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Feb 17 11:09:45 2015 +0100

    Fix compilation with clang
    
    The compilation error was
    
     account.h:140:113: error: expected ')'
     const QList< QPair<QString, QString> > &queryItems = QList< QPair<QString, QString> >());
                                                                                       ^
    followed by more errors.
    
    The problem is because the compiler has hard time disambiguiating the comma
    
    int foo(const QPair<int, int> &p = QPair<int, int>());
                                                ^
    It is indeed quite hard for the compiler to know if this comma is a separation
    between complate arguments or the separation between arguments of the functions.
    
    Use the C++11 construct instead which does not need commas
---
 src/libsync/account.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsync/account.h b/src/libsync/account.h
index ef4c36c..5e1cd65 100644
--- a/src/libsync/account.h
+++ b/src/libsync/account.h
@@ -137,7 +137,7 @@ public:
 
     // static helper function
     static QUrl concatUrlPath(const QUrl &url, const QString &concatPath,
-                              const QList< QPair<QString, QString> > &queryItems = QList< QPair<QString, QString> >());
+                              const QList< QPair<QString, QString> > &queryItems = {});
 
     /**  Returns a new settings pre-set in a specific group.  The Settings will be created
          with the given parent. If no parents is specified, the caller must destroy the settings */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list