This commit is contained in:
Michael Davidsaver
2013-04-30 15:20:17 -04:00
parent 659ce13e98
commit ee5a370c01
3 changed files with 13 additions and 16 deletions

View File

@@ -45,10 +45,7 @@ static std::vector<String> split(String commaSeparatedList) {
}
Convert::Convert()
: pvDataCreate(getPVDataCreate()),
trueString("true"),
falseString("false"),
illegalScalarType("Illegal ScalarType")
: pvDataCreate(getPVDataCreate())
{}
@@ -298,8 +295,7 @@ void Convert::copyStructure(PVStructurePtr const & from, PVStructurePtr const &
{
if(to->isImmutable()) {
if(from==to) return;
String message("Convert.copyStructure destination is immutable");
throw std::invalid_argument(message);
throw std::invalid_argument("Convert.copyStructure destination is immutable");
}
if(from==to) return;
PVFieldPtrArray const & fromDatas = from->getPVFields();
@@ -343,6 +339,10 @@ void Convert::copyStructure(PVStructurePtr const & from, PVStructurePtr const &
String message("Convert.copyStructure Illegal copyStructure");
throw std::invalid_argument(message);
}
if(toData->isImmutable()) {
if(fromData==toData) return;
throw std::invalid_argument("Convert.copyStructure destination is immutable");
}
switch(fromType) {
case scalar:
{
@@ -415,8 +415,4 @@ ConvertPtr Convert::getConvert()
return convert;
}
ConvertPtr getConvert() {
return Convert::getConvert();
}
}}