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() {
|
||||
|
||||
const SGPropertyNode *ai = fgGetNode("/ai/models", true);
|
||||
const SGPropertyNode_ptr ai = fgGetNode("/ai/models", true);
|
||||
|
||||
for (int i = ai->nChildren() - 1; i >= -1; i--) {
|
||||
const SGPropertyNode *model;
|
||||
SGPropertyNode_ptr model;
|
||||
|
||||
if (i < 0) { // last iteration: selected model
|
||||
model = _selected_ac;
|
||||
|
|
|
@ -95,7 +95,7 @@ private:
|
|||
double _max_speed;
|
||||
|
||||
const SGMaterial* _material;
|
||||
const SGPropertyNode *_selected_ac;
|
||||
SGPropertyNode_ptr _selected_ac;
|
||||
|
||||
bool _MPControl, _patrol, _stn_deg_true;
|
||||
|
||||
|
|
|
@ -349,10 +349,10 @@ bool FGAIGroundVehicle::getPitch() {
|
|||
|
||||
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--) {
|
||||
const SGPropertyNode *model;
|
||||
SGPropertyNode_ptr model;
|
||||
|
||||
if (i < 0) { // last iteration: selected model
|
||||
model = _selected_ac;
|
||||
|
|
|
@ -96,7 +96,7 @@ private:
|
|||
double _dt_count, _next_run, _break_count;
|
||||
|
||||
const SGMaterial* _material;
|
||||
const SGPropertyNode *_selected_ac;
|
||||
SGPropertyNode_ptr _selected_ac;
|
||||
|
||||
string _parent;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ private:
|
|||
double _rightBrakeOutput;
|
||||
|
||||
SGPropertyNode_ptr _root;
|
||||
SGPropertyNode* _brakeInputs[4];
|
||||
SGPropertyNode_ptr _brakeInputs[4];
|
||||
SGPropertyNode_ptr _weightOnWheelsNode;
|
||||
SGPropertyNode_ptr _engineControlsNode;
|
||||
SGPropertyNode_ptr _groundspeedNode;
|
||||
|
|
|
@ -419,7 +419,7 @@ private:
|
|||
SGPropertyNode_ptr _apTargetAltitudeFt;
|
||||
SGPropertyNode_ptr _apAltitudeLock;
|
||||
|
||||
std::vector<SGPropertyNode*> _tiedNodes;
|
||||
std::vector<SGPropertyNode_ptr> _tiedNodes;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
bool build ();
|
||||
|
||||
private:
|
||||
SGPropertyNode *config_props;
|
||||
SGPropertyNode_ptr config_props;
|
||||
bool _explicitGps;
|
||||
};
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ class FGNavRadio : public SGSubsystem
|
|||
double _gsNeedleDeflectionNorm;
|
||||
|
||||
SGSharedPtr<SGSampleGroup> _sgr;
|
||||
std::vector<SGPropertyNode*> _tiedNodes;
|
||||
std::vector<SGPropertyNode_ptr> _tiedNodes;
|
||||
|
||||
bool updateWithPower(double aDt);
|
||||
|
||||
|
@ -208,7 +208,7 @@ class FGNavRadio : public SGSubsystem
|
|||
template <typename T>
|
||||
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);
|
||||
nd->tie(aRawValue);
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ private:
|
|||
string name;
|
||||
int num;
|
||||
string path;
|
||||
SGPropertyNode *config_props;
|
||||
SGPropertyNode_ptr config_props;
|
||||
|
||||
bool enabled;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
bool build ();
|
||||
|
||||
private:
|
||||
SGPropertyNode *config_props;
|
||||
SGPropertyNode_ptr config_props;
|
||||
bool enabled;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue