From 4a31c85643612f495550d9031a6125330265d87b Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 19 Apr 2012 07:51:23 +0000 Subject: [PATCH] U++: fixed sources to support c++0x (rm #269) git-svn-id: svn://ultimatepp.org/upp/trunk@4818 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Util.cpp | 2 +- uppsrc/CtrlLib/ArrayCtrl.cpp | 2 +- uppsrc/CtrlLib/DateTimeCtrl.h | 2 +- uppsrc/ide/Common/Util.cpp | 4 ++-- uppsrc/ide/ide.upp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/uppsrc/Core/Util.cpp b/uppsrc/Core/Util.cpp index ee26bde2c..c71282432 100644 --- a/uppsrc/Core/Util.cpp +++ b/uppsrc/Core/Util.cpp @@ -540,7 +540,7 @@ String Decode64(const String& s) for(;;) { byte ea = *p++ - ' ' - 1, eb = *p++ - ' ' - 1, ec = *p++ - ' ' - 1, ed = *p++ - ' ' - 1; - byte out[3] = { (ea << 2) | (eb >> 4), (eb << 4) | (ec >> 2), (ec << 6) | (ed >> 0) }; + byte out[3] = { byte((ea << 2) | (eb >> 4)), byte((eb << 4) | (ec >> 2)), byte((ec << 6) | (ed >> 0)) }; switch(len) { case 1: dec.Cat(out[0]); return dec; diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index cc1970f07..a254bd153 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -2772,7 +2772,7 @@ static String sCsvFormat(const Value& v) String ArrayCtrl::AsCsv(bool sel, int sep, bool hdr) { - char h[2] = { sep, 0 }; + char h[2] = { (char)sep, 0 }; return AsText(sCsvFormat, sel, h, "\r\n", hdr ? h : NULL, "\r\n"); } diff --git a/uppsrc/CtrlLib/DateTimeCtrl.h b/uppsrc/CtrlLib/DateTimeCtrl.h index 269f0c69e..4b79ed2e2 100644 --- a/uppsrc/CtrlLib/DateTimeCtrl.h +++ b/uppsrc/CtrlLib/DateTimeCtrl.h @@ -450,7 +450,7 @@ class DateTimeCtrl : public T { int width = sz.cx; int height = sz.cy; - Rect rw = Ctrl::GetWorkArea(); + Rect rw = this->Ctrl::GetWorkArea(); Rect rs = this->GetScreenRect(); Rect r; r.left = rs.left; diff --git a/uppsrc/ide/Common/Util.cpp b/uppsrc/ide/Common/Util.cpp index 91ab2ec40..835dcac15 100644 --- a/uppsrc/ide/Common/Util.cpp +++ b/uppsrc/ide/Common/Util.cpp @@ -54,9 +54,9 @@ bool SaveChangedFileFinish(const String& filename, const String& data) return SaveFileFinish(filename, data); } -typedef VectorMap StringMap; +typedef VectorMap sStringMap; -GLOBAL_VAR(StringMap, sWorkspaceCfg) +GLOBAL_VAR(sStringMap, sWorkspaceCfg) GLOBAL_VAR(Vector, sWorkspaceCfgFlush) void RegisterWorkspaceConfig(const char *name) diff --git a/uppsrc/ide/ide.upp b/uppsrc/ide/ide.upp index 37e198c6e..22f9077b7 100644 --- a/uppsrc/ide/ide.upp +++ b/uppsrc/ide/ide.upp @@ -87,7 +87,7 @@ file Copying; mainconfig - "" = "GUI SVO_VALUE", + "" = "GUI", "" = "GUI .USEMALLOC", "" = ".NOGTK GUI", "" = "GUI HEAPDBG CHECKINIT",