App: Modernise ctors dtors defs etc
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include "ComplexGeoData.h"
|
||||
#include <Base/BoundBox.h>
|
||||
@@ -49,22 +49,20 @@ ComplexGeoData::ComplexGeoData()
|
||||
{
|
||||
}
|
||||
|
||||
ComplexGeoData::~ComplexGeoData()
|
||||
{
|
||||
}
|
||||
ComplexGeoData::~ComplexGeoData() = default;
|
||||
|
||||
Data::Segment* ComplexGeoData::getSubElementByName(const char* name) const
|
||||
{
|
||||
int index = 0;
|
||||
std::string element;
|
||||
boost::regex ex("^([^0-9]*)([0-9]*)$");
|
||||
boost::cmatch what;
|
||||
|
||||
if (boost::regex_match(name, what, ex)) {
|
||||
element = what[1].str();
|
||||
index = std::atoi(what[2].str().c_str());
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
std::string element;
|
||||
boost::regex ex("^([^0-9]*)([0-9]*)$");
|
||||
boost::cmatch what;
|
||||
|
||||
if (boost::regex_match(name, what, ex)) {
|
||||
element = what[1].str();
|
||||
index = std::atoi(what[2].str().c_str());
|
||||
}
|
||||
|
||||
return getSubElement(element.c_str(), static_cast<unsigned long>(index));
|
||||
}
|
||||
|
||||
@@ -175,10 +173,10 @@ const char *ComplexGeoData::isMappedElement(const char *name) {
|
||||
}
|
||||
|
||||
std::string ComplexGeoData::newElementName(const char *name) {
|
||||
if(!name)
|
||||
if(!name)
|
||||
return std::string();
|
||||
const char *dot = strrchr(name,'.');
|
||||
if(!dot || dot==name)
|
||||
if(!dot || dot==name)
|
||||
return name;
|
||||
const char *c = dot-1;
|
||||
for(;c!=name;--c) {
|
||||
@@ -193,10 +191,10 @@ std::string ComplexGeoData::newElementName(const char *name) {
|
||||
}
|
||||
|
||||
std::string ComplexGeoData::oldElementName(const char *name) {
|
||||
if(!name)
|
||||
if(!name)
|
||||
return std::string();
|
||||
const char *dot = strrchr(name,'.');
|
||||
if(!dot || dot==name)
|
||||
if(!dot || dot==name)
|
||||
return name;
|
||||
const char *c = dot-1;
|
||||
for(;c!=name;--c) {
|
||||
@@ -211,7 +209,7 @@ std::string ComplexGeoData::oldElementName(const char *name) {
|
||||
}
|
||||
|
||||
std::string ComplexGeoData::noElementName(const char *name) {
|
||||
if(!name)
|
||||
if(!name)
|
||||
return std::string();
|
||||
auto element = findElementName(name);
|
||||
if(element)
|
||||
|
||||
Reference in New Issue
Block a user