Mercurial > hg > orthanc
changeset 1814:7c5ea3e51839
fix msvc build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 24 Nov 2015 11:03:09 +0100 |
parents | 5fc11b79b406 |
children | 2abfdca9b915 |
files | Plugins/Samples/ModalityWorklists/Plugin.cpp |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Samples/ModalityWorklists/Plugin.cpp Tue Nov 24 09:15:53 2015 +0100 +++ b/Plugins/Samples/ModalityWorklists/Plugin.cpp Tue Nov 24 11:03:09 2015 +0100 @@ -24,8 +24,8 @@ #include <json/value.h> #include <json/reader.h> #include <string.h> -#include <strings.h> #include <iostream> +#include <algorithm> static OrthancPluginContext* context_ = NULL; static std::string folder_; @@ -94,7 +94,6 @@ } - static bool GetQueryDicom(Json::Value& value, const OrthancPluginWorklistQuery* query) { @@ -114,6 +113,12 @@ } +static void ToLowerCase(std::string& s) +{ + std::transform(s.begin(), s.end(), s.begin(), tolower); +} + + OrthancPluginErrorCode Callback(OrthancPluginWorklistAnswers* answers, const OrthancPluginWorklistQuery* query, const char* remoteAet, @@ -139,7 +144,9 @@ if (is_regular_file(it->status())) { std::string extension = boost::filesystem::extension(it->path()); - if (!strcasecmp(".wl", extension.c_str())) + ToLowerCase(extension); + + if (extension == ".wl") { OrthancPluginErrorCode error = MatchWorklist(answers, query, it->path().string()); if (error)