1
0
Fork 0

src/Airports/: fixed some minor warnings and use snprintf.

This commit is contained in:
Julian Smith 2020-06-14 18:15:50 +01:00
parent be3329e4b4
commit a00e9e571d
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ public:
~Block() {};
int getId() { return id; };
void updateTimeStamps(time_t bt, time_t now) { blocktime = (bt < blocktime) ? bt : blocktime; touch = now; };
const time_t getBlockTime() const { return blocktime; };
time_t getBlockTime() const { return blocktime; };
time_t getTimeStamp() { return touch; };
bool operator< (const Block &other) const { return blocktime < other.blocktime; };
};

View file

@ -78,7 +78,7 @@ string FGRunway::reverseIdent(const string& aRunwayIdent)
rn -= 36;
}
sprintf(buf, "%02i", rn);
snprintf(buf, sizeof(buf), "%02i", rn);
if(ident.size() == 3) {
char suffix = toupper(ident[2]);
if(suffix == 'L') {