1
0
Fork 0

Use SGPropertyNode_ptr wherever possible

This commit is contained in:
ehofman 2009-12-29 13:56:18 +00:00 committed by Tim Moore
parent c1bb4aec97
commit 8da2f1a31b
10 changed files with 13 additions and 13 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -419,7 +419,7 @@ private:
SGPropertyNode_ptr _apTargetAltitudeFt;
SGPropertyNode_ptr _apAltitudeLock;
std::vector<SGPropertyNode*> _tiedNodes;
std::vector<SGPropertyNode_ptr> _tiedNodes;
};

View file

@ -34,7 +34,7 @@ public:
bool build ();
private:
SGPropertyNode *config_props;
SGPropertyNode_ptr config_props;
bool _explicitGps;
};

View file

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

View file

@ -266,7 +266,7 @@ private:
string name;
int num;
string path;
SGPropertyNode *config_props;
SGPropertyNode_ptr config_props;
bool enabled;

View file

@ -34,7 +34,7 @@ public:
bool build ();
private:
SGPropertyNode *config_props;
SGPropertyNode_ptr config_props;
bool enabled;
};