ifndef protection for headers

This commit is contained in:
amer cerkic 2019-05-06 13:51:52 -07:00
parent 8273e5b666
commit 26b38f5950
3 changed files with 17 additions and 7 deletions

View file

@ -2461,13 +2461,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
///Platform test function not staying for final code ///Platform test function not staying for final code
void Application::initializePlatform() { void Application::initializePlatform() {
//init the platform //init the platform
platform::create(); platform::create();
//run the enumeration //run the enumeration
if (platform::enumerateProcessors()) { if (platform::enumerateProcessors()) {
for (int i = 0; i < platform::getNumProcessor(); i++) { for (int i = 0; i < platform::getNumProcessor(); i++) {
platform::getProcessor(i); std::string test = platform::getProcessor(i).dump();
qDebug() << test.c_str();
} }
} }
} }

View file

@ -6,7 +6,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#pragma once #ifndef hifi_WinPlatform_h
#define hifi_WinPlatform_h
#include "platform.h" #include "platform.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
@ -25,4 +27,6 @@ namespace platform {
int getTotalSystemRam(); int getTotalSystemRam();
}; };
} // namespace platform } // namespace platform
#endif //hifi_winplatform_h

View file

@ -6,7 +6,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#pragma once #ifndef hifi_Platform_h
#define hifi_Platform_h
#include <string> #include <string>
#include <vector> #include <vector>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
@ -41,4 +43,6 @@ nlohmann::json getProcessor(int index);
int getNumMemory(); int getNumMemory();
nlohmann::json getSystemRam(int index); nlohmann::json getSystemRam(int index);
} // namespace platform } // namespace platform
#endif // hifi_platform_h