Mercurial > hg > orthanc
changeset 1334:7f0aa3c0f659
code improvements
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Mar 2015 15:28:19 +0200 |
parents | 732b6a4ed541 |
children | 4bed63189508 |
files | Core/Compression/HierarchicalZipWriter.cpp Core/ImageFormats/ImageProcessing.cpp Core/MultiThreading/ThreadedCommandProcessor.cpp Core/Toolbox.cpp Resources/CMake/DcmtkConfiguration.cmake Resources/CMake/SQLiteConfiguration.cmake UnitTestsSources/FromDcmtkTests.cpp |
diffstat | 7 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Compression/HierarchicalZipWriter.cpp Mon Mar 30 15:12:21 2015 +0200 +++ b/Core/Compression/HierarchicalZipWriter.cpp Mon Mar 30 15:28:19 2015 +0200 @@ -53,7 +53,7 @@ if (c == '^') c = ' '; - if (c < 128 && + if (c <= 127 && c >= 0) { if (isspace(c))
--- a/Core/ImageFormats/ImageProcessing.cpp Mon Mar 30 15:12:21 2015 +0200 +++ b/Core/ImageFormats/ImageProcessing.cpp Mon Mar 30 15:28:19 2015 +0200 @@ -209,7 +209,7 @@ void MultiplyConstantInternal(ImageAccessor& image, float factor) { - if (abs(factor - 1.0f) <= std::numeric_limits<float>::epsilon()) + if (std::abs(factor - 1.0f) <= std::numeric_limits<float>::epsilon()) { return; }
--- a/Core/MultiThreading/ThreadedCommandProcessor.cpp Mon Mar 30 15:12:21 2015 +0200 +++ b/Core/MultiThreading/ThreadedCommandProcessor.cpp Mon Mar 30 15:28:19 2015 +0200 @@ -175,7 +175,7 @@ { boost::mutex::scoped_lock lock(mutex_); - while (!remainingCommands_ == 0) + while (remainingCommands_ != 0) { processedCommand_.wait(lock); }
--- a/Core/Toolbox.cpp Mon Mar 30 15:12:21 2015 +0200 +++ b/Core/Toolbox.cpp Mon Mar 30 15:28:19 2015 +0200 @@ -633,7 +633,7 @@ result.reserve(source.size() + 1); for (size_t i = 0; i < source.size(); i++) { - if (source[i] < 128 && source[i] >= 0 && !iscntrl(source[i])) + if (source[i] <= 127 && source[i] >= 0 && !iscntrl(source[i])) { result.push_back(source[i]); }
--- a/Resources/CMake/DcmtkConfiguration.cmake Mon Mar 30 15:12:21 2015 +0200 +++ b/Resources/CMake/DcmtkConfiguration.cmake Mon Mar 30 15:28:19 2015 +0200 @@ -3,6 +3,7 @@ find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic /usr/share/dcmtk /usr/share/libdcmtk2 + /usr/local/share/dcmtk ) message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}")
--- a/Resources/CMake/SQLiteConfiguration.cmake Mon Mar 30 15:12:21 2015 +0200 +++ b/Resources/CMake/SQLiteConfiguration.cmake Mon Mar 30 15:28:19 2015 +0200 @@ -28,8 +28,11 @@ message(FATAL_ERROR "Please install the libsqlite3-dev package") endif() + find_path(SQLITE_INCLUDE_DIR sqlite3.h) + message("SQLite include dir: ${SQLITE_INCLUDE_DIR}") + # Autodetection of the version of SQLite - file(STRINGS "/usr/include/sqlite3.h" SQLITE_VERSION_NUMBER1 REGEX "#define SQLITE_VERSION_NUMBER.*$") + file(STRINGS "${SQLITE_INCLUDE_DIR}/sqlite3.h" SQLITE_VERSION_NUMBER1 REGEX "#define SQLITE_VERSION_NUMBER.*$") string(REGEX REPLACE "#define SQLITE_VERSION_NUMBER(.*)$" "\\1" SQLITE_VERSION_NUMBER ${SQLITE_VERSION_NUMBER1}) message("Detected version of SQLite: ${SQLITE_VERSION_NUMBER}")
--- a/UnitTestsSources/FromDcmtkTests.cpp Mon Mar 30 15:12:21 2015 +0200 +++ b/UnitTestsSources/FromDcmtkTests.cpp Mon Mar 30 15:28:19 2015 +0200 @@ -282,8 +282,6 @@ std::string tag; ASSERT_TRUE(g.GetTagValue(tag, DICOM_TAG_PATIENT_NAME)); - - std::string expected(); ASSERT_EQ(std::string(testEncodingsExpected[i]), tag); } }