misc
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user