From 9cdfa99a04b9943ac3b0206ddcee1e31b86d9e4f Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 2 Nov 2015 07:32:52 +0000 Subject: [PATCH] bazaar: Fixing for C++11 git-svn-id: svn://ultimatepp.org/upp/trunk@9133 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Gen/VTypes.h | 4 + bazaar/RSSExample/RSSExample.upp | 2 +- bazaar/RSSExample/main.cpp | 3 +- bazaar/Rss/Rss.upp | 5 +- bazaar/SvgView/SvgView.upp | 15 ---- bazaar/SvgView/init | 8 -- bazaar/SvgView/main.cpp | 132 ------------------------------- bazaar/ValueCtrl/ValueCtrl.h | 4 +- bazaar/ValueCtrlTest/init | 5 ++ 9 files changed, 15 insertions(+), 163 deletions(-) delete mode 100644 bazaar/SvgView/SvgView.upp delete mode 100644 bazaar/SvgView/init delete mode 100644 bazaar/SvgView/main.cpp create mode 100644 bazaar/ValueCtrlTest/init diff --git a/bazaar/Gen/VTypes.h b/bazaar/Gen/VTypes.h index 23ca6816a..885f71334 100644 --- a/bazaar/Gen/VTypes.h +++ b/bazaar/Gen/VTypes.h @@ -27,6 +27,10 @@ inline bool operator==(const Ctrl::LogPos& x, const Value& v) { return RichVal inline bool operator!=(const Value& v, const Ctrl::LogPos& x) { return RichValue::Extract(v) != x; } inline bool operator!=(const Ctrl::LogPos& x, const Value& v) { return RichValue::Extract(v) != x; } +inline int SgnCompare(const Ctrl::LogPos&, const Ctrl::LogPos&) { return 0; } + +inline int PolyCompare(const Ctrl::LogPos&, const Value&) { return 0; } + template<> String AsString(const Ctrl::LogPos& pos); template<> Stream& operator%(Stream& s, Ctrl::LogPos& pos); diff --git a/bazaar/RSSExample/RSSExample.upp b/bazaar/RSSExample/RSSExample.upp index 931b3bdeb..83121ddc7 100644 --- a/bazaar/RSSExample/RSSExample.upp +++ b/bazaar/RSSExample/RSSExample.upp @@ -1,4 +1,4 @@ -description "Bazaar: Rss 2.0 multi-channel feed creation example using Rss class. Author: İsmail YILMAZ (Oblivion)"; +description "Bazaar: Rss 2.0 multi-channel feed creation example using Rss class. Author: İsmail YILMAZ (Oblivion)\377"; uses CtrlLib, diff --git a/bazaar/RSSExample/main.cpp b/bazaar/RSSExample/main.cpp index ef8cbfc50..c5cd5d790 100644 --- a/bazaar/RSSExample/main.cpp +++ b/bazaar/RSSExample/main.cpp @@ -35,6 +35,7 @@ void RSSExample::ComposeRss() )); for(int i = 1; i < 5; i++) { + RssTag cat = RssCategory(Format("Item %d has a category", i)); channel1 .Item( RssItem( @@ -44,7 +45,7 @@ void RSSExample::ComposeRss() Format("Item %d has an author", i), // Item author NULL, // Item comment NULL, // Item publication date - (i < 3 ? &RssCategory(Format("Item %d has a category", i)) : NULL) // Item category + (i < 3 ? &cat : NULL) // Item category )); } diff --git a/bazaar/Rss/Rss.upp b/bazaar/Rss/Rss.upp index 25ea39240..7fa7808a0 100644 --- a/bazaar/Rss/Rss.upp +++ b/bazaar/Rss/Rss.upp @@ -1,4 +1,4 @@ -description "Bazaar: Rss 2.0 parser/composer class. Author: İsmail YILMAZ, (Oblivion)"; +description "Bazaar: Rss 2.0 parser/composer class. Author: İsmail YILMAZ, (Oblivion)\377"; uses Core; @@ -8,6 +8,3 @@ file Rss.cpp charset "UTF-8", Changelog.txt charset "UTF-8"; -mainconfig - "" = "GUI"; - diff --git a/bazaar/SvgView/SvgView.upp b/bazaar/SvgView/SvgView.upp deleted file mode 100644 index eb56503ca..000000000 --- a/bazaar/SvgView/SvgView.upp +++ /dev/null @@ -1,15 +0,0 @@ -description "Simple SVG viewer (PainterSvg demo)"; - -uses - CtrlLib, - plugin\tif, - plugin\jpg, - plugin\gif, - PainterSvg; - -file - main.cpp; - -mainconfig - "" = "GUI"; - diff --git a/bazaar/SvgView/init b/bazaar/SvgView/init deleted file mode 100644 index d2436c7b5..000000000 --- a/bazaar/SvgView/init +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _SvgView_icpp_init_stub -#define _SvgView_icpp_init_stub -#include "CtrlLib/init" -#include "plugin\tif/init" -#include "plugin\jpg/init" -#include "plugin\gif/init" -#include "PainterSvg/init" -#endif diff --git a/bazaar/SvgView/main.cpp b/bazaar/SvgView/main.cpp deleted file mode 100644 index 987327b0b..000000000 --- a/bazaar/SvgView/main.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include - -using namespace Upp; - -class SvgView : public TopWindow { -public: - virtual bool Key(dword key, int); - -private: - ImageCtrl img; - FileList files; - Splitter splitter; - String dir; - FrameTop