diff --git a/src/plugins/simulator/fsxcommon/simconnectfunctions.h b/src/plugins/simulator/fscommon/simulatorfscommonfunctions.h similarity index 83% rename from src/plugins/simulator/fsxcommon/simconnectfunctions.h rename to src/plugins/simulator/fscommon/simulatorfscommonfunctions.h index baa6cc4f9..5e42caf55 100644 --- a/src/plugins/simulator/fsxcommon/simconnectfunctions.h +++ b/src/plugins/simulator/fscommon/simulatorfscommonfunctions.h @@ -1,5 +1,5 @@ /* Copyright (C) 2018 - * swift project Community / Contributors + * swift Project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, @@ -9,18 +9,19 @@ //! \file -#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTFUNCTIONS_H -#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTFUNCTIONS_H +#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMONFUNCTIONS_H +#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMONFUNCTIONS_H #include #include namespace BlackSimPlugin { - namespace FsxCommon + namespace FsCommon { //! Correctly casted values/checks @{ HRESULT inline s_ok() { return S_OK; } + HRESULT inline s_false() { return S_FALSE; } static bool inline isOk(HRESULT result) { return result == s_ok(); } static bool inline isOk(HRESULT hr1, HRESULT hr2, HRESULT hr3 = s_ok(), HRESULT hr4 = s_ok()) { return isOk(hr1) && isOk(hr2) && isOk(hr3) && isOk(hr4); } bool inline isFailure(HRESULT result) { return !isOk(result); } diff --git a/src/plugins/simulator/fsxcommon/simconnectdatadefinition.cpp b/src/plugins/simulator/fsxcommon/simconnectdatadefinition.cpp index d0e0bc151..04cd4e719 100644 --- a/src/plugins/simulator/fsxcommon/simconnectdatadefinition.cpp +++ b/src/plugins/simulator/fsxcommon/simconnectdatadefinition.cpp @@ -9,7 +9,7 @@ #include "simconnectdatadefinition.h" #include "simconnectsymbols.h" -#include "simconnectfunctions.h" +#include "../fscommon/simulatorfscommonfunctions.h" #include "blackmisc/aviation/aircraftparts.h" #include "blackmisc/aviation/aircraftenginelist.h" #include "blackmisc/logmessage.h" @@ -17,6 +17,7 @@ using namespace BlackMisc; using namespace BlackMisc::Aviation; +using namespace BlackSimPlugin::FsCommon; namespace BlackSimPlugin { diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp index 3d463db42..c8ca0d2ef 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp @@ -9,7 +9,7 @@ #include "simulatorfsxcommon.h" #include "simconnectsymbols.h" -#include "simconnectfunctions.h" +#include "../fscommon/simulatorfscommonfunctions.h" #include "blackcore/application.h" #include "blackmisc/network/textmessage.h" #include "blackmisc/simulation/fsx/simconnectutilities.h" @@ -48,6 +48,7 @@ using namespace BlackMisc::Simulation::Fsx; using namespace BlackMisc::Simulation::Settings; using namespace BlackMisc::Weather; using namespace BlackCore; +using namespace BlackSimPlugin::FsCommon; namespace BlackSimPlugin { diff --git a/src/plugins/simulator/p3d/simulatorp3d.cpp b/src/plugins/simulator/p3d/simulatorp3d.cpp index e5c20da03..7cb703576 100644 --- a/src/plugins/simulator/p3d/simulatorp3d.cpp +++ b/src/plugins/simulator/p3d/simulatorp3d.cpp @@ -8,7 +8,7 @@ */ #include "simulatorp3d.h" -#include "../fsxcommon/simconnectfunctions.h" +#include "../fscommon/simulatorfscommonfunctions.h" #include "blackmisc/threadutils.h" #include "blackmisc/logmessage.h" #include "blackconfig/buildconfig.h" @@ -24,7 +24,7 @@ using namespace BlackMisc::Simulation::FsCommon; using namespace BlackSimPlugin::FsxCommon; using namespace BlackMisc::Weather; using namespace BlackCore; -using namespace BlackSimPlugin::FsxCommon; +using namespace BlackSimPlugin::FsCommon; namespace BlackSimPlugin {