From 2a208a73e12a553c4a4bf16fe9b345469839ecec Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 1 Nov 2015 19:19:17 +0000 Subject: [PATCH] bazaar: Fixing for C++11 git-svn-id: svn://ultimatepp.org/upp/trunk@9130 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/PieTest/PieTest.upp | 36 +++++++++---------- bazaar/PolyXML/PolyXML.h | 4 +-- bazaar/ProductVersion/ProductVersion.upp | 3 ++ bazaar/ProductVersion/init | 1 + .../ProductVersionTest/ProductVersionTest.cpp | 13 +++++++ .../ProductVersionTest/ProductVersionTest.upp | 10 ++++++ bazaar/ProductVersionTest/init | 5 +++ bazaar/Scatter/Scatter.cpp | 8 ++--- bazaar/XMLMenu/WithXMLMenu.h | 2 +- bazaar/XMLMenu/XMLCommand.h | 6 ++-- 10 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 bazaar/ProductVersionTest/ProductVersionTest.cpp create mode 100644 bazaar/ProductVersionTest/ProductVersionTest.upp create mode 100644 bazaar/ProductVersionTest/init diff --git a/bazaar/PieTest/PieTest.upp b/bazaar/PieTest/PieTest.upp index 2f301734e..63409518b 100644 --- a/bazaar/PieTest/PieTest.upp +++ b/bazaar/PieTest/PieTest.upp @@ -1,18 +1,18 @@ -description "Bazaar: PieChart control test&demo by Andrei-Catalin"; - -uses - CtrlLib, - Scatter, - Report, - PdfDraw; - -file - PieTest.h, - main.cpp, - PieTest.lay, - PieTest.iml, - app.tpp; - -mainconfig - "" = "GUI"; - +description "Bazaar: PieChart control test&demo by Andrei-Catalin\377"; + +uses + CtrlLib, + Scatter, + Report, + PdfDraw; + +file + PieTest.h, + main.cpp, + PieTest.lay, + PieTest.iml, + app.tpp; + +mainconfig + "" = "GUI"; + diff --git a/bazaar/PolyXML/PolyXML.h b/bazaar/PolyXML/PolyXML.h index 3cffcf481..ebdb0f812 100644 --- a/bazaar/PolyXML/PolyXML.h +++ b/bazaar/PolyXML/PolyXML.h @@ -38,7 +38,7 @@ template class PolyXMLUnknown : public T { XmlNode node = ParseXML(rawXML); xml.Add(); - xml.Node() = node; + xml.Node() = pick(node); } } }; @@ -191,7 +191,7 @@ template class PolyXMLArrayMapOne : public ArrayMap // Xmlizer void Xmlize(XmlIO &xml); - One& Add(const K &key, pick_ One &data) { return ArrayMap >::AddPick(key, data); } + One& Add(const K &key, pick_ One &data) { return ArrayMap >::AddPick(key, pick(data)); } // progress callback Callback2Progress; diff --git a/bazaar/ProductVersion/ProductVersion.upp b/bazaar/ProductVersion/ProductVersion.upp index 5300a7a53..508d34306 100644 --- a/bazaar/ProductVersion/ProductVersion.upp +++ b/bazaar/ProductVersion/ProductVersion.upp @@ -1,5 +1,8 @@ description "Small class to handle application versions\377"; +uses + Core; + file ProductVersion.h, ProductVersion.cpp; diff --git a/bazaar/ProductVersion/init b/bazaar/ProductVersion/init index e944851e1..4e1f25c9a 100644 --- a/bazaar/ProductVersion/init +++ b/bazaar/ProductVersion/init @@ -1,3 +1,4 @@ #ifndef _ProductVersion_icpp_init_stub #define _ProductVersion_icpp_init_stub +#include "Core/init" #endif diff --git a/bazaar/ProductVersionTest/ProductVersionTest.cpp b/bazaar/ProductVersionTest/ProductVersionTest.cpp new file mode 100644 index 000000000..539f20a63 --- /dev/null +++ b/bazaar/ProductVersionTest/ProductVersionTest.cpp @@ -0,0 +1,13 @@ +#include + +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + ProductVersion v(1, 2, 3); + ProductVersion v2 = v; + v2.IncDevel(); + DUMP(v < v2); +} diff --git a/bazaar/ProductVersionTest/ProductVersionTest.upp b/bazaar/ProductVersionTest/ProductVersionTest.upp new file mode 100644 index 000000000..d07522f27 --- /dev/null +++ b/bazaar/ProductVersionTest/ProductVersionTest.upp @@ -0,0 +1,10 @@ +uses + Core, + ProductVersion; + +file + ProductVersionTest.cpp; + +mainconfig + "" = ""; + diff --git a/bazaar/ProductVersionTest/init b/bazaar/ProductVersionTest/init new file mode 100644 index 000000000..e8e1e7c5a --- /dev/null +++ b/bazaar/ProductVersionTest/init @@ -0,0 +1,5 @@ +#ifndef _ProductVersionTest_icpp_init_stub +#define _ProductVersionTest_icpp_init_stub +#include "Core/init" +#include "ProductVersion/init" +#endif diff --git a/bazaar/Scatter/Scatter.cpp b/bazaar/Scatter/Scatter.cpp index e8503a2ac..da4e912f4 100644 --- a/bazaar/Scatter/Scatter.cpp +++ b/bazaar/Scatter/Scatter.cpp @@ -416,7 +416,7 @@ void Scatter::Graduation_FormatY2(Formats fi) Scatter &Scatter::AddSeries(Vector & points,const String& legend,const bool& join, const class::Color& pcolor, const int& width, const int& thickness) { - vPointsData.AddPick(points); + vPointsData.AddPick(pick(points)); vJoin.Add(join); vSmooth.Add(false); vPColors.Add(pcolor); @@ -851,7 +851,7 @@ void Scatter::RemoveAllSeries() void Scatter::PlotFunction(PlotFunc f, const String& legend, const class::Color& fcolor, const int& weight) { Vector series; - vFunctionData.AddPick(series); + vFunctionData.AddPick(pick(series)); vAdress.Add(f); @@ -874,7 +874,7 @@ void Scatter::PlotParaFunction(PlotParamFunc f, const String& legend, const clas } vFColors.Add(fcolor); vFThickness.Add(weight); - vFunctionData.AddPick(series); + vFunctionData.AddPick(pick(series)); vFPrimaryY.Add(true); vFPattern.Add(LINE_SOLID); vFLegend.Add(legend); @@ -1781,7 +1781,7 @@ Vector Scatter::Cubic(const Vector& DataSet, const int& fineness,double OutSet<(OutSet); + return Vector(pick(OutSet)); } void ParseTextMultiline(const String &text, Font fnt, Array &texts, Array &sizes) { diff --git a/bazaar/XMLMenu/WithXMLMenu.h b/bazaar/XMLMenu/WithXMLMenu.h index 33f22887f..4ac289b69 100644 --- a/bazaar/XMLMenu/WithXMLMenu.h +++ b/bazaar/XMLMenu/WithXMLMenu.h @@ -142,7 +142,7 @@ template class WithXMLMenu : public T, public XMLMenuInterface // gets a context menu by name -- NULL if none MenuBar *GetContextMenu(String const &name); - // xml support + // xml supportbin void Xmlize(XmlIO xml); }; diff --git a/bazaar/XMLMenu/XMLCommand.h b/bazaar/XMLMenu/XMLCommand.h index 22246fce9..e407ca865 100644 --- a/bazaar/XMLMenu/XMLCommand.h +++ b/bazaar/XMLMenu/XMLCommand.h @@ -66,19 +66,19 @@ class XMLCommand : DeepCopyOption // an array of available commands class XMLCommands : DeepCopyOption { + private: ArrayMap commands; public: + rval_default(XMLCommands); + // default constructor XMLCommands() {} // copy constructor XMLCommands(XMLCommands const &cmds, int dummy) : commands(cmds.commands, 0) {} - // pick constructor - XMLCommands(XMLCommands rval_ cmds) : commands(pick(cmds.commands)) {} - // adds a custom command XMLCommands &Add(String const &id, String const &cmd);