Clean up namespace issues
avoiding "uses..." in header files.
This commit is contained in:
parent
4a53002784
commit
1827825fcb
9 changed files with 37 additions and 32 deletions
|
@ -40,13 +40,16 @@
|
|||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
|
||||
#include "AIAircraft.hxx"
|
||||
#include "performancedata.hxx"
|
||||
#include "performancedb.hxx"
|
||||
#include <signal.h>
|
||||
|
||||
using std::string;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
//#include <Airports/trafficcontroller.hxx>
|
||||
|
||||
FGAIAircraft::FGAIAircraft(FGAISchedule *ref) :
|
||||
|
|
|
@ -149,7 +149,7 @@ FGAIBase::~FGAIBase() {
|
|||
if (_fx && _refID != 0 && _refID != 1) {
|
||||
SGSoundMgr *smgr = globals->get_soundmgr();
|
||||
if (smgr) {
|
||||
stringstream name;
|
||||
std::stringstream name;
|
||||
name << "aifx:";
|
||||
name << _refID;
|
||||
smgr->remove(name.str());
|
||||
|
@ -250,7 +250,7 @@ void FGAIBase::update(double dt) {
|
|||
props->setStringValue("sim/sound/path", fxpath.c_str());
|
||||
|
||||
// initialize the sound configuration
|
||||
stringstream name;
|
||||
std::stringstream name;
|
||||
name << "aifx:";
|
||||
name << _refID;
|
||||
_fx = new FGFX(name.str(), props);
|
||||
|
|
|
@ -91,7 +91,7 @@ FGAIManager::postinit() {
|
|||
enabled->setBoolValue(true);
|
||||
|
||||
// process all scenarios
|
||||
map<string, bool> scenarios;
|
||||
std::map<string, bool> scenarios;
|
||||
for (int i = 0 ; i < root->nChildren() ; i++) {
|
||||
SGPropertyNode *n = root->getChild(i);
|
||||
if (strcmp(n->getName(), "scenario"))
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "AIManager.hxx"
|
||||
#include "AIBallistic.hxx"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
const double FGSubmodelMgr::lbs_to_slugs = 0.031080950172;
|
||||
|
||||
|
@ -824,7 +826,7 @@ void FGSubmodelMgr::valueChanged(SGPropertyNode *prop)
|
|||
|
||||
const char* _model_added = _model_added_node->getStringValue();
|
||||
|
||||
basic_string <char>::size_type indexCh2b;
|
||||
std::basic_string <char>::size_type indexCh2b;
|
||||
|
||||
string str2 = _model_added;
|
||||
const char *cstr2b = "multiplayer";
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
|
||||
using std::sort;
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/***************************************************************************
|
||||
* ActiveRunway
|
||||
|
|
|
@ -113,6 +113,9 @@
|
|||
#include "positioninit.hxx"
|
||||
|
||||
using std::string;
|
||||
using std::endl;
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using namespace boost::algorithm;
|
||||
|
||||
|
||||
|
|
|
@ -40,22 +40,18 @@
|
|||
#ifndef _FGSCHEDFLIGHT_HXX_
|
||||
#define _FGSCHEDFLIGHT_HXX_
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
using std::vector;
|
||||
|
||||
class FGAirport;
|
||||
|
||||
class FGScheduledFlight
|
||||
{
|
||||
private:
|
||||
string callsign;
|
||||
string fltRules;
|
||||
std::string callsign;
|
||||
std::string fltRules;
|
||||
FGAirport *departurePort;
|
||||
FGAirport *arrivalPort;
|
||||
string depId;
|
||||
string arrId;
|
||||
string requiredAircraft;
|
||||
std::string depId;
|
||||
std::string arrId;
|
||||
std::string requiredAircraft;
|
||||
time_t departureTime;
|
||||
time_t arrivalTime;
|
||||
time_t repeatPeriod;
|
||||
|
@ -116,8 +112,8 @@ public:
|
|||
void setFlightRules(string val) { fltRules = val; };
|
||||
};
|
||||
|
||||
typedef vector<FGScheduledFlight*> FGScheduledFlightVec;
|
||||
typedef vector<FGScheduledFlight*>::iterator FGScheduledFlightVecIterator;
|
||||
typedef std::vector<FGScheduledFlight*> FGScheduledFlightVec;
|
||||
typedef std::vector<FGScheduledFlight*>::iterator FGScheduledFlightVecIterator;
|
||||
|
||||
typedef std::map < std::string, FGScheduledFlightVec > FGScheduledFlightMap;
|
||||
|
||||
|
|
|
@ -38,16 +38,16 @@ class FGAIAircraft;
|
|||
class FGAISchedule
|
||||
{
|
||||
private:
|
||||
string modelPath;
|
||||
string homePort;
|
||||
string livery;
|
||||
string registration;
|
||||
string airline;
|
||||
string acType;
|
||||
string m_class;
|
||||
string flightType;
|
||||
string flightIdentifier;
|
||||
string currentDestination;
|
||||
std::string modelPath;
|
||||
std::string homePort;
|
||||
std::string livery;
|
||||
std::string registration;
|
||||
std::string airline;
|
||||
std::string acType;
|
||||
std::string m_class;
|
||||
std::string flightType;
|
||||
std::string flightIdentifier;
|
||||
std::string currentDestination;
|
||||
bool heavy;
|
||||
FGScheduledFlightVec flights;
|
||||
SGGeod position;
|
||||
|
|
|
@ -67,12 +67,11 @@
|
|||
#include <Airports/simple.hxx>
|
||||
#include <Main/fg_init.hxx>
|
||||
|
||||
|
||||
|
||||
#include "TrafficMgr.hxx"
|
||||
|
||||
using std::sort;
|
||||
using std::strcmp;
|
||||
using std::endl;
|
||||
|
||||
/**
|
||||
* Thread encapsulating parsing the traffic schedules.
|
||||
|
@ -180,7 +179,7 @@ void FGTrafficManager::shutdown()
|
|||
|
||||
// Save the heuristics data
|
||||
bool saveData = false;
|
||||
ofstream cachefile;
|
||||
std::ofstream cachefile;
|
||||
if (fgGetBool("/sim/traffic-manager/heuristics")) {
|
||||
SGPath cacheData(globals->get_fg_home());
|
||||
cacheData.append("ai");
|
||||
|
@ -305,7 +304,7 @@ void FGTrafficManager::loadHeuristics()
|
|||
cacheData.append(airport + "-cache.txt");
|
||||
string revisionStr;
|
||||
if (cacheData.exists()) {
|
||||
ifstream data(cacheData.c_str());
|
||||
std::ifstream data(cacheData.c_str());
|
||||
data >> revisionStr;
|
||||
if (revisionStr != "[TrafficManagerCachedata:ref:2011:09:04]") {
|
||||
SG_LOG(SG_GENERAL, SG_ALERT,"Traffic Manager Warning: discarding outdated cachefile " <<
|
||||
|
@ -434,7 +433,7 @@ void FGTrafficManager::readTimeTableFromFile(SGPath infileName)
|
|||
string buffString;
|
||||
vector <string> tokens, depTime,arrTime;
|
||||
vector <string>::iterator it;
|
||||
ifstream infile(infileName.str().c_str());
|
||||
std::ifstream infile(infileName.str().c_str());
|
||||
while (1) {
|
||||
infile.getline(buffer, 256);
|
||||
if (infile.eof()) {
|
||||
|
|
Loading…
Reference in a new issue