Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/LinearAlgebra.cpp Tue Nov 10 11:11:28 2020 +0100 +++ b/OrthancStone/Sources/Toolbox/LinearAlgebra.cpp Tue Nov 10 16:08:44 2020 +0100 @@ -107,7 +107,8 @@ } catch (std::exception&) { - target.clear(); + // DO NOT use ".clear()" here, as the "Vector" class doesn't behave like std::vector! + target.resize(0); return false; } @@ -147,7 +148,8 @@ } catch (boost::bad_lexical_cast&) { - target.clear(); + // DO NOT use ".clear()" here, as the "Vector" class doesn't behave like std::vector! + target.resize(0); return false; } #endif