changeset 304:fb455aa44112 refactoring

compatibility
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Jun 2019 09:51:47 +0200
parents eb4ac27f0768
children ec6231689d89
files Plugin/Plugin.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Mon Jun 17 18:04:46 2019 +0200
+++ b/Plugin/Plugin.cpp	Tue Jun 18 09:51:47 2019 +0200
@@ -185,13 +185,15 @@
           value["Group"] = tag.GetGroup();
           value["Element"] = tag.GetElement();
           
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7)
           OrthancPlugins::OrthancString name;
+
           name.Assign(OrthancPluginGetTagName(context, tag.GetGroup(), tag.GetElement(), NULL));
-
           if (name.GetContent() != NULL)
           {
             value["Name"] = std::string(name.GetContent());
           }
+#endif
 
           const Json::Value& source = answer[i][tags[j]];
           if (source.type() != Json::objectValue ||