Addressed issues found by Google code lint.
Fixed: - Removed trailing whitespace. - Removed out of date TODO's. - Added #include<algorithm> to DataManager.cpp - Reordered includes to include C system headers before C++ system headers. - Added username to TODO's - Renamed include guards to use full project name as prefix. - Made methods and parameters const where possible. - Made UDPSocket constructor explicit. Won't Fix: - snprintf is introduced in C++11. - Trailing comments at the end of namespace & header guards - Did not re-inlude headers already included by the matching XPC header. - localtime is fine since X-Plane is not multithreaded at all on the plugin side. - Linter confuses #elif with parens as a function call. - namespace indentation
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "XPLMDataAccess.h"
|
||||
#include "XPLMGraphics.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
@@ -516,7 +517,7 @@ namespace XPC
|
||||
drefSize = min(drefSize, size);
|
||||
XPLMSetDatavf(xdref, values, 0, drefSize);
|
||||
}
|
||||
|
||||
|
||||
void DataManager::Set(DREF dref, int values[], int size, char aircraft)
|
||||
{
|
||||
const XPLMDataRef& xdref = aircraft == 0 ? drefs[dref] : mdrefs[aircraft][dref];
|
||||
@@ -738,7 +739,6 @@ namespace XPC
|
||||
Set(DREF_LocalY, local[1], aircraft);
|
||||
Set(DREF_LocalZ, local[2], aircraft);
|
||||
// If the sim is unpaused, this will override the above settings.
|
||||
// TODO: Are these setable when paused? Are these necessary?
|
||||
Set(DREF_Latitude, (double)pos[0], aircraft);
|
||||
Set(DREF_Longitude, (double)pos[1], aircraft);
|
||||
Set(DREF_Elevation, (double)pos[2], aircraft);
|
||||
|
||||
Reference in New Issue
Block a user