use boost's blank instead of none_t

This commit is contained in:
Janus Troelsen
2017-05-23 12:02:06 +02:00
committed by Thomas Krijnen
parent 1b9a28d799
commit d7c275e941
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -83,7 +83,7 @@ IfcEntityList::ptr IfcWritableEntity::getInverse(IfcSchema::Type::Enum type, int
std::string IfcWritableEntity::datatype() const { return IfcSchema::Type::ToString(_type); }
Argument* IfcWritableEntity::getArgument (unsigned int i) {
if (args[i] == 0) {
_setArgument(i, boost::none);
_setArgument(i, boost::blank());
}
return args[i];
}
@@ -301,7 +301,7 @@ void IfcWritableEntity::setArgument(int i,const std::vector< boost::dynamic_bits
class SizeVisitor : public boost::static_visitor<int> {
public:
int operator()(const boost::none_t& /*i*/) const { return -1; }
int operator()(const boost::blank& /*i*/) const { return -1; }
int operator()(const IfcWriteArgument::Derived& /*i*/) const { return -1; }
int operator()(const int& /*i*/) const { return -1; }
int operator()(const bool& /*i*/) const { return -1; }
@@ -385,7 +385,7 @@ private:
public:
StringBuilderVisitor(std::ostringstream& stream, bool upper = false)
: data(stream), upper(upper) {}
void operator()(const boost::none_t& /*i*/) { data << "$"; }
void operator()(const boost::blank& /*i*/) { data << "$"; }
void operator()(const IfcWriteArgument::Derived& /*i*/) { data << "*"; }
void operator()(const int& i) { data << i; }
void operator()(const bool& i) { data << (i ? ".T." : ".F."); }
+1 -1
View File
@@ -59,7 +59,7 @@ namespace IfcWrite {
private:
boost::variant<
// A null argument, it will always serialize to $
boost::none_t,
boost::blank,
// A derived argument, it will always serialize to *
Derived,
// An integer argument, e.g. 123