From 5069bf05a79cae74ff08342ed575f59d08611614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Wed, 3 Apr 2019 13:23:51 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@773 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/core/pivariant.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src_main/core/pivariant.h b/src_main/core/pivariant.h index e25aea97..2079e100 100755 --- a/src_main/core/pivariant.h +++ b/src_main/core/pivariant.h @@ -584,20 +584,20 @@ public: static PIVariant fromValue(const PIByteArray & c, const PIString & type) { PIVariant ret; + PIVariant::Type t = typeFromName(type); + if (t == pivInvalid) { #ifdef CUSTOM_PIVARIANT - ret._info = __PIVariantInfoStorage__::get()->map->value(type, 0); - if (!ret._info) { + ret._info = __PIVariantInfoStorage__::get()->map->value(type, 0); + if (ret._info) { + t = pivCustom; + } else #endif - PIVariant::Type t = typeFromName(type); - if (t == pivInvalid) { + { piCout << "Can`t initialize PIVariant from unregistered type \"" << type << "\"!"; return ret; } - ret._type = t; -#ifdef CUSTOM_PIVARIANT - } else - ret._type = pivCustom; -#endif + } + ret._type = t; ret._content = c; return ret; }