App: modernize C++11
* use nullptr
This commit is contained in:
@@ -127,7 +127,7 @@ public:
|
||||
bool operator>(const String & other) const { return str > other.str; }
|
||||
|
||||
void checkImport(const App::DocumentObject *owner,
|
||||
const App::DocumentObject *obj=0, String *objName=0);
|
||||
const App::DocumentObject *obj=nullptr, String *objName=nullptr);
|
||||
private:
|
||||
|
||||
std::string str;
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
static Component MapComponent(String &&_key)
|
||||
{return Component::MapComponent(_key);}
|
||||
|
||||
ObjectIdentifier(const App::PropertyContainer * _owner = 0,
|
||||
ObjectIdentifier(const App::PropertyContainer * _owner = nullptr,
|
||||
const std::string & property = std::string(), int index=INT_MAX);
|
||||
|
||||
ObjectIdentifier(const App::PropertyContainer * _owner, bool localProperty);
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
template<typename C>
|
||||
void addComponents(const C &cs) { components.insert(components.end(), cs.begin(), cs.end()); }
|
||||
|
||||
const Component & getPropertyComponent(int i, int *idx=0) const;
|
||||
const Component & getPropertyComponent(int i, int *idx=nullptr) const;
|
||||
|
||||
void setComponent(int idx, Component &&comp);
|
||||
void setComponent(int idx, const Component &comp);
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
|
||||
bool isTouched() const;
|
||||
|
||||
App::Property *getProperty(int *ptype=0) const;
|
||||
App::Property *getProperty(int *ptype=nullptr) const;
|
||||
|
||||
App::ObjectIdentifier canonicalPath() const;
|
||||
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
* first referred object dependency. Or else, all object and property
|
||||
* dependencies will be returned.
|
||||
*/
|
||||
Dependencies getDep(bool needProps, std::vector<std::string> *labels=0) const;
|
||||
Dependencies getDep(bool needProps, std::vector<std::string> *labels=nullptr) const;
|
||||
|
||||
/** Get dependencies of this object identifier
|
||||
*
|
||||
@@ -378,12 +378,12 @@ public:
|
||||
* first referred object dependency. Or else, all object and property
|
||||
* dependencies will be returned.
|
||||
*/
|
||||
void getDep(Dependencies &deps, bool needProps, std::vector<std::string> *labels=0) const;
|
||||
void getDep(Dependencies &deps, bool needProps, std::vector<std::string> *labels=nullptr) const;
|
||||
|
||||
/// Returns all label references
|
||||
void getDepLabels(std::vector<std::string> &labels) const;
|
||||
|
||||
App::Document *getDocument(String name = String(), bool *ambiguous=0) const;
|
||||
App::Document *getDocument(String name = String(), bool *ambiguous=nullptr) const;
|
||||
|
||||
App::DocumentObject *getDocumentObject() const;
|
||||
|
||||
@@ -407,9 +407,9 @@ public:
|
||||
|
||||
// Getter
|
||||
|
||||
App::any getValue(bool pathValue=false, bool *isPseudoProperty=0) const;
|
||||
App::any getValue(bool pathValue=false, bool *isPseudoProperty=nullptr) const;
|
||||
|
||||
Py::Object getPyValue(bool pathValue=false, bool *isPseudoProperty=0) const;
|
||||
Py::Object getPyValue(bool pathValue=false, bool *isPseudoProperty=nullptr) const;
|
||||
|
||||
// Setter: is const because it does not alter the object state,
|
||||
// but does have an aiding effect.
|
||||
@@ -424,7 +424,7 @@ public:
|
||||
|
||||
bool adjustLinks(ExpressionVisitor &v, const std::set<App::DocumentObject *> &inList);
|
||||
|
||||
bool updateElementReference(ExpressionVisitor &v, App::DocumentObject *feature=0, bool reverse=false);
|
||||
bool updateElementReference(ExpressionVisitor &v, App::DocumentObject *feature=nullptr, bool reverse=false);
|
||||
|
||||
void resolveAmbiguity();
|
||||
|
||||
@@ -462,7 +462,7 @@ protected:
|
||||
void getSubPathStr(std::ostream &ss, const ResolveResults &result, bool toPython=false) const;
|
||||
|
||||
Py::Object access(const ResolveResults &rs,
|
||||
Py::Object *value=0, Dependencies *deps=0) const;
|
||||
Py::Object *value=nullptr, Dependencies *deps=nullptr) const;
|
||||
|
||||
void resolve(ResolveResults & results) const;
|
||||
void resolveAmbiguity(ResolveResults &results);
|
||||
|
||||
Reference in New Issue
Block a user