Mercurial > hg > orthanc
comparison OrthancServer/Search/ValueConstraint.cpp @ 1754:3a4f7dc00f49 db-changes
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Oct 2015 11:31:58 +0100 |
parents | 99f4a05f39fa |
children | 03b030680e3d |
comparison
equal
deleted
inserted
replaced
1753:faf2ecab3472 | 1754:3a4f7dc00f49 |
---|---|
33 #include "../PrecompiledHeadersServer.h" | 33 #include "../PrecompiledHeadersServer.h" |
34 #include "ValueConstraint.h" | 34 #include "ValueConstraint.h" |
35 | 35 |
36 #include "../../Core/Toolbox.h" | 36 #include "../../Core/Toolbox.h" |
37 | 37 |
38 #include <stdio.h> | |
39 | |
38 namespace Orthanc | 40 namespace Orthanc |
39 { | 41 { |
40 ValueConstraint::ValueConstraint(const DicomTag& tag, | 42 ValueConstraint::ValueConstraint(const DicomTag& tag, |
41 const std::string& value, | 43 const std::string& value, |
42 bool isCaseSensitive) : | 44 bool isCaseSensitive) : |
43 IFindConstraint(tag), | 45 IFindConstraint(tag), |
44 value_(value), | 46 value_(value), |
45 isCaseSensitive_(isCaseSensitive) | 47 isCaseSensitive_(isCaseSensitive) |
46 { | 48 { |
47 if (isCaseSensitive) | 49 if (!isCaseSensitive) |
48 { | 50 { |
49 Toolbox::ToUpperCase(value_); | 51 Toolbox::ToUpperCase(value_); |
50 } | 52 } |
51 } | 53 } |
52 | 54 |
63 return value_ == value; | 65 return value_ == value; |
64 } | 66 } |
65 else | 67 else |
66 { | 68 { |
67 std::string v; | 69 std::string v; |
68 Toolbox::ToLowerCase(v, value); | 70 Toolbox::ToUpperCase(v, value); |
69 return value_ == v; | 71 return value_ == v; |
70 } | 72 } |
71 } | 73 } |
72 } | 74 } |