From 22af95ab6af8d13385bb64d1d4101ce16bda1602 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 12 May 2015 06:44:09 +0000 Subject: [PATCH] ide: CppParser fixed to compile in CLANG11 git-svn-id: svn://ultimatepp.org/upp/trunk@8434 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CppBase/macro.cpp | 2 +- uppsrc/CppBase/ppfile.cpp | 2 +- uppsrc/ide/Browser/Base.cpp | 2 +- uppsrc/ide/Browser/Sch.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/uppsrc/CppBase/macro.cpp b/uppsrc/CppBase/macro.cpp index 6587c6310..0c2b05ee3 100644 --- a/uppsrc/CppBase/macro.cpp +++ b/uppsrc/CppBase/macro.cpp @@ -68,7 +68,7 @@ String CppMacro::Expand(const Vector& p, const Vector& ep) const variadic = true; pp.Trim(pp.GetCount() - 1); } - Index param(pick(Split(pp, ','))); + Index param(Split(pp, ',')); static String VA_ARGS("__VA_ARGS__"); // static - Speed optimization while(*s) { if(IsAlpha(*s) || *s == '_') { diff --git a/uppsrc/CppBase/ppfile.cpp b/uppsrc/CppBase/ppfile.cpp index 08a440ddc..ff42d6c58 100644 --- a/uppsrc/CppBase/ppfile.cpp +++ b/uppsrc/CppBase/ppfile.cpp @@ -17,7 +17,7 @@ bool IsHFile(const String& path) void SetSpaces(String& l, int pos, int count) { - StringBuffer s = l; + StringBuffer s(l); memset(~s + pos, ' ', count); l = s; } diff --git a/uppsrc/ide/Browser/Base.cpp b/uppsrc/ide/Browser/Base.cpp index de0b95483..d3b0d11d8 100644 --- a/uppsrc/ide/Browser/Base.cpp +++ b/uppsrc/ide/Browser/Base.cpp @@ -208,7 +208,7 @@ bool CheckFile(const SourceFileInfo& f, const String& path) return f.included_id_macros == included_id_macros; } -void ParseFiles(Progress& pi, const Index parse_file) +void ParseFiles(Progress& pi, const Index& parse_file) { pi.SetTotal(parse_file.GetCount()); pi.SetPos(0); diff --git a/uppsrc/ide/Browser/Sch.cpp b/uppsrc/ide/Browser/Sch.cpp index f4195bffa..342daf526 100644 --- a/uppsrc/ide/Browser/Sch.cpp +++ b/uppsrc/ide/Browser/Sch.cpp @@ -108,5 +108,5 @@ Vector PreprocessSchFile(const char *fn) } catch(CParser::Error) {} - return Vector() << r << rr; + return pick(Vector() << r << rr); }