Use SGPropertyNode_ptr wherever possible
This commit is contained in:
parent
c1bb4aec97
commit
8da2f1a31b
10 changed files with 13 additions and 13 deletions
|
@ -235,10 +235,10 @@ bool FGAIEscort::getGroundElev(SGGeod inpos) {
|
||||||
|
|
||||||
void FGAIEscort::setParent() {
|
void FGAIEscort::setParent() {
|
||||||
|
|
||||||
const SGPropertyNode *ai = fgGetNode("/ai/models", true);
|
const SGPropertyNode_ptr ai = fgGetNode("/ai/models", true);
|
||||||
|
|
||||||
for (int i = ai->nChildren() - 1; i >= -1; i--) {
|
for (int i = ai->nChildren() - 1; i >= -1; i--) {
|
||||||
const SGPropertyNode *model;
|
SGPropertyNode_ptr model;
|
||||||
|
|
||||||
if (i < 0) { // last iteration: selected model
|
if (i < 0) { // last iteration: selected model
|
||||||
model = _selected_ac;
|
model = _selected_ac;
|
||||||
|
|
|
@ -95,7 +95,7 @@ private:
|
||||||
double _max_speed;
|
double _max_speed;
|
||||||
|
|
||||||
const SGMaterial* _material;
|
const SGMaterial* _material;
|
||||||
const SGPropertyNode *_selected_ac;
|
SGPropertyNode_ptr _selected_ac;
|
||||||
|
|
||||||
bool _MPControl, _patrol, _stn_deg_true;
|
bool _MPControl, _patrol, _stn_deg_true;
|
||||||
|
|
||||||
|
|
|
@ -349,10 +349,10 @@ bool FGAIGroundVehicle::getPitch() {
|
||||||
|
|
||||||
void FGAIGroundVehicle::setParent() {
|
void FGAIGroundVehicle::setParent() {
|
||||||
|
|
||||||
const SGPropertyNode *ai = fgGetNode("/ai/models", true);
|
const SGPropertyNode_ptr ai = fgGetNode("/ai/models", true);
|
||||||
|
|
||||||
for (int i = ai->nChildren() - 1; i >= -1; i--) {
|
for (int i = ai->nChildren() - 1; i >= -1; i--) {
|
||||||
const SGPropertyNode *model;
|
SGPropertyNode_ptr model;
|
||||||
|
|
||||||
if (i < 0) { // last iteration: selected model
|
if (i < 0) { // last iteration: selected model
|
||||||
model = _selected_ac;
|
model = _selected_ac;
|
||||||
|
|
|
@ -96,7 +96,7 @@ private:
|
||||||
double _dt_count, _next_run, _break_count;
|
double _dt_count, _next_run, _break_count;
|
||||||
|
|
||||||
const SGMaterial* _material;
|
const SGMaterial* _material;
|
||||||
const SGPropertyNode *_selected_ac;
|
SGPropertyNode_ptr _selected_ac;
|
||||||
|
|
||||||
string _parent;
|
string _parent;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ private:
|
||||||
double _rightBrakeOutput;
|
double _rightBrakeOutput;
|
||||||
|
|
||||||
SGPropertyNode_ptr _root;
|
SGPropertyNode_ptr _root;
|
||||||
SGPropertyNode* _brakeInputs[4];
|
SGPropertyNode_ptr _brakeInputs[4];
|
||||||
SGPropertyNode_ptr _weightOnWheelsNode;
|
SGPropertyNode_ptr _weightOnWheelsNode;
|
||||||
SGPropertyNode_ptr _engineControlsNode;
|
SGPropertyNode_ptr _engineControlsNode;
|
||||||
SGPropertyNode_ptr _groundspeedNode;
|
SGPropertyNode_ptr _groundspeedNode;
|
||||||
|
|
|
@ -419,7 +419,7 @@ private:
|
||||||
SGPropertyNode_ptr _apTargetAltitudeFt;
|
SGPropertyNode_ptr _apTargetAltitudeFt;
|
||||||
SGPropertyNode_ptr _apAltitudeLock;
|
SGPropertyNode_ptr _apAltitudeLock;
|
||||||
|
|
||||||
std::vector<SGPropertyNode*> _tiedNodes;
|
std::vector<SGPropertyNode_ptr> _tiedNodes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
bool build ();
|
bool build ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyNode *config_props;
|
SGPropertyNode_ptr config_props;
|
||||||
bool _explicitGps;
|
bool _explicitGps;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ class FGNavRadio : public SGSubsystem
|
||||||
double _gsNeedleDeflectionNorm;
|
double _gsNeedleDeflectionNorm;
|
||||||
|
|
||||||
SGSharedPtr<SGSampleGroup> _sgr;
|
SGSharedPtr<SGSampleGroup> _sgr;
|
||||||
std::vector<SGPropertyNode*> _tiedNodes;
|
std::vector<SGPropertyNode_ptr> _tiedNodes;
|
||||||
|
|
||||||
bool updateWithPower(double aDt);
|
bool updateWithPower(double aDt);
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ class FGNavRadio : public SGSubsystem
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void tie(const char* aRelPath, const SGRawValue<T>& aRawValue)
|
void tie(const char* aRelPath, const SGRawValue<T>& aRawValue)
|
||||||
{
|
{
|
||||||
SGPropertyNode* nd = _radio_node->getNode(aRelPath, true);
|
SGPropertyNode_ptr nd = _radio_node->getNode(aRelPath, true);
|
||||||
_tiedNodes.push_back(nd);
|
_tiedNodes.push_back(nd);
|
||||||
nd->tie(aRawValue);
|
nd->tie(aRawValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,7 @@ private:
|
||||||
string name;
|
string name;
|
||||||
int num;
|
int num;
|
||||||
string path;
|
string path;
|
||||||
SGPropertyNode *config_props;
|
SGPropertyNode_ptr config_props;
|
||||||
|
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
bool build ();
|
bool build ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyNode *config_props;
|
SGPropertyNode_ptr config_props;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue