App: Modernise ctors dtors defs etc

This commit is contained in:
berniev
2022-08-01 03:07:32 +10:00
committed by wwmayer
parent ffd51eda61
commit 65a356835b
80 changed files with 866 additions and 1160 deletions

View File

@@ -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)