Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/LinearAlgebra.cpp @ 1635:1a714e21ea7c
start refactoring DicomInstanceParameters
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Nov 2020 16:08:44 +0100 |
parents | 8563ea5d8ae4 |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1634:a4418a489e86 | 1635:1a714e21ea7c |
---|---|
105 { | 105 { |
106 target[i] = std::stod(items[i]); | 106 target[i] = std::stod(items[i]); |
107 } | 107 } |
108 catch (std::exception&) | 108 catch (std::exception&) |
109 { | 109 { |
110 target.clear(); | 110 // DO NOT use ".clear()" here, as the "Vector" class doesn't behave like std::vector! |
111 target.resize(0); | |
111 return false; | 112 return false; |
112 } | 113 } |
113 | 114 |
114 #elif 0 | 115 #elif 0 |
115 /** | 116 /** |
145 { | 146 { |
146 target[i] = boost::lexical_cast<double>(items[i]); | 147 target[i] = boost::lexical_cast<double>(items[i]); |
147 } | 148 } |
148 catch (boost::bad_lexical_cast&) | 149 catch (boost::bad_lexical_cast&) |
149 { | 150 { |
150 target.clear(); | 151 // DO NOT use ".clear()" here, as the "Vector" class doesn't behave like std::vector! |
152 target.resize(0); | |
151 return false; | 153 return false; |
152 } | 154 } |
153 #endif | 155 #endif |
154 } | 156 } |
155 | 157 |