From ca23b2517da200a2a39e740603fcbe4fc3defaf6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 31 Aug 2016 23:50:55 +0100 Subject: Use Slicer enum helper for writing enumerated values --- icespider/compile/routeCompiler.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/icespider/compile/routeCompiler.cpp b/icespider/compile/routeCompiler.cpp index ae75bf2..e2ab8a1 100644 --- a/icespider/compile/routeCompiler.cpp +++ b/icespider/compile/routeCompiler.cpp @@ -12,20 +12,6 @@ namespace IceSpider { namespace Compile { - class StringValue : public Slicer::ValueTarget { - public: - StringValue(std::string & t) : target(t) { } - void get(const bool &) const override { } - void get(const Ice::Byte &) const override { } - void get(const Ice::Short &) const override { } - void get(const Ice::Int &) const override { } - void get(const Ice::Long &) const override { } - void get(const Ice::Float &) const override { } - void get(const Ice::Double &) const override { } - void get(const std::string & v) const override { target = v; } - std::string & target; - }; - RouteCompiler::RouteCompiler() { searchPath.push_back(boost::filesystem::current_path()); @@ -243,9 +229,7 @@ namespace IceSpider { template std::string getEnumString(Enum & e) { - std::string rtn; - Slicer::ModelPart::CreateFor(e)->GetValue(new StringValue(rtn)); - return rtn; + return Slicer::ModelPartForEnum::lookup(e); } void -- cgit v1.2.3