mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 21:50:01 +00:00
Fix errors in serialization
This commit is contained in:
@@ -41,7 +41,6 @@ IfcWritableEntity::IfcWritableEntity(IfcAbstractEntity* e)
|
|||||||
{
|
{
|
||||||
file = e->file;
|
file = e->file;
|
||||||
_type = e->type();
|
_type = e->type();
|
||||||
delete _id;
|
|
||||||
_id = new int(e->id());
|
_id = new int(e->id());
|
||||||
|
|
||||||
const unsigned int count = e->getArgumentCount();
|
const unsigned int count = e->getArgumentCount();
|
||||||
@@ -234,8 +233,11 @@ public:
|
|||||||
void operator()(const double& i) { data << format_double(i); }
|
void operator()(const double& i) { data << format_double(i); }
|
||||||
void operator()(const std::string& i) {
|
void operator()(const std::string& i) {
|
||||||
std::string s = i;
|
std::string s = i;
|
||||||
if (upper) s = IfcCharacterEncoder(s);
|
if (upper) {
|
||||||
data << s;
|
data << static_cast<std::string>(IfcCharacterEncoder(s));
|
||||||
|
} else {
|
||||||
|
data << '\'' << s << '\'';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void operator()(const std::vector<int>& i) { serialize(i); }
|
void operator()(const std::vector<int>& i) { serialize(i); }
|
||||||
void operator()(const std::vector<double>& i) { serialize_double(i); }
|
void operator()(const std::vector<double>& i) { serialize_double(i); }
|
||||||
|
|||||||
Reference in New Issue
Block a user