mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Style and dead code removal
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "utils.h"
|
||||
#include "XPMPMultiplayer.h"
|
||||
#include "XPMPPlaneRenderer.h"
|
||||
#include "XPLMGraphics.h"
|
||||
#include <XPLM/XPLMGraphics.h>
|
||||
#include <XPLM/XPLMProcessing.h>
|
||||
#include <XPLM/XPLMUtilities.h>
|
||||
#include <XPLM/XPLMPlanes.h>
|
||||
@@ -1122,13 +1122,6 @@ namespace XSwiftBus
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool CTraffic::isPlusMinusOne(float v)
|
||||
{
|
||||
if (std::isnan(v)) { return false; }
|
||||
if (v > 1.00001f || v < -1.00001f) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTraffic::isPlusMinus180(float v)
|
||||
{
|
||||
if (std::isnan(v)) { return false; }
|
||||
@@ -1143,13 +1136,6 @@ namespace XSwiftBus
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTraffic::isZeroTo360(double v)
|
||||
{
|
||||
if (std::isnan(v)) { return false; }
|
||||
if (v < 0 || v >= 360.0) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
float CTraffic::normalizeToPlusMinus180Deg(float v)
|
||||
{
|
||||
if (std::isnan(v)) { return 0.0f; }
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "terrainprobe.h"
|
||||
#include "menus.h"
|
||||
#include "XPMPMultiplayer.h"
|
||||
#include "XPLMCamera.h"
|
||||
#include <XPLM/XPLMCamera.h>
|
||||
#include <XPLM/XPLMDisplay.h>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
@@ -158,7 +158,6 @@ namespace XSwiftBus
|
||||
static int preferences(const char *section, const char *name, int def);
|
||||
static float preferences(const char *section, const char *name, float def);
|
||||
|
||||
static int orbitOwnAircraftFunc(XPLMCameraPosition_t *cameraPosition, int isLosingControl, void *refcon);
|
||||
static int orbitPlaneFunc(XPLMCameraPosition_t *cameraPosition, int isLosingControl, void *refcon);
|
||||
static int drawCallback(XPLMDrawingPhase phase, int isBefore, void *refcon);
|
||||
static int followAircraftKeySniffer(char character, XPLMKeyFlags flags, char virtualKey, void *refcon);
|
||||
@@ -189,10 +188,8 @@ namespace XSwiftBus
|
||||
|
||||
//! Check functions
|
||||
//! @{
|
||||
static bool isPlusMinusOne(float v);
|
||||
static bool isPlusMinus180(float v);
|
||||
static bool isPlusMinus180(double v);
|
||||
static bool isZeroTo360(double v);
|
||||
//! @}
|
||||
|
||||
//! Normalize to (-180, 180] or [0, 360) degrees
|
||||
|
||||
Reference in New Issue
Block a user