comparison Core/Toolbox.cpp @ 4036:c6e82885f570

merge
author Alain Mazy <alain@mazy.be>
date Wed, 10 Jun 2020 10:28:15 +0200
parents 058b5ade8acd
children
comparison
equal deleted inserted replaced
4035:cc6ed76bba27 4036:c6e82885f570
116 } 116 }
117 117
118 118
119 #if defined(ORTHANC_STATIC_ICU) 119 #if defined(ORTHANC_STATIC_ICU)
120 # if (ORTHANC_STATIC_ICU == 1 && ORTHANC_ENABLE_LOCALE == 1) 120 # if (ORTHANC_STATIC_ICU == 1 && ORTHANC_ENABLE_LOCALE == 1)
121 # include <EmbeddedResources.h> 121 # include <OrthancFrameworkResources.h>
122 # include <unicode/udata.h> 122 # include <unicode/udata.h>
123 # include <unicode/uloc.h> 123 # include <unicode/uloc.h>
124 # include "Compression/GzipCompressor.h" 124 # include "Compression/GzipCompressor.h"
125 125
126 static std::string globalIcuData_; 126 static std::string globalIcuData_;
1471 { 1471 {
1472 LOG(INFO) << "Setting up the ICU common data"; 1472 LOG(INFO) << "Setting up the ICU common data";
1473 1473
1474 GzipCompressor compressor; 1474 GzipCompressor compressor;
1475 compressor.Uncompress(globalIcuData_, 1475 compressor.Uncompress(globalIcuData_,
1476 EmbeddedResources::GetFileResourceBuffer(EmbeddedResources::LIBICU_DATA), 1476 FrameworkResources::GetFileResourceBuffer(FrameworkResources::LIBICU_DATA),
1477 EmbeddedResources::GetFileResourceSize(EmbeddedResources::LIBICU_DATA)); 1477 FrameworkResources::GetFileResourceSize(FrameworkResources::LIBICU_DATA));
1478 1478
1479 std::string md5; 1479 std::string md5;
1480 Toolbox::ComputeMD5(md5, globalIcuData_); 1480 Toolbox::ComputeMD5(md5, globalIcuData_);
1481 1481
1482 if (md5 != ORTHANC_ICU_DATA_MD5 || 1482 if (md5 != ORTHANC_ICU_DATA_MD5 ||
2224 return reinterpret_cast<OrthancLinesIterator*>(new Orthanc::Toolbox::LinesIterator(content)); 2224 return reinterpret_cast<OrthancLinesIterator*>(new Orthanc::Toolbox::LinesIterator(content));
2225 } 2225 }
2226 2226
2227 2227
2228 bool OrthancLinesIterator_GetLine(std::string& target, 2228 bool OrthancLinesIterator_GetLine(std::string& target,
2229 const OrthancLinesIterator* iterator) 2229 const OrthancLinesIterator* iterator)
2230 { 2230 {
2231 if (iterator != NULL) 2231 if (iterator != NULL)
2232 { 2232 {
2233 return reinterpret_cast<const Orthanc::Toolbox::LinesIterator*>(iterator)->GetLine(target); 2233 return reinterpret_cast<const Orthanc::Toolbox::LinesIterator*>(iterator)->GetLine(target);
2234 } 2234 }