Refactor code

This commit is contained in:
2020-09-25 01:55:18 +02:00
parent 9f105a4397
commit 4f2122a2be
12 changed files with 457 additions and 358 deletions

View File

@@ -4,9 +4,7 @@
namespace openVulkanoCpp
{
#define MAKE_VERSION(major, minor, patch) (((major) << 22) | ((minor) << 12) | (patch))
const char* ENGINE_NAME = "openVulkanoCpp";
inline const char* ENGINE_NAME = "openVulkanoCpp";
struct EngineVersion
{
@@ -17,15 +15,15 @@ namespace openVulkanoCpp
EngineVersion(int major, int minor, int patch, int build = 0) : major(major), minor(minor), patch(patch)
{
intVersion = ((major) << 24) | ((minor) << 16) | (patch);
std::string buildConfig = "";
std::string_view buildConfig;
#ifdef _DEBUG
buildConfig += "-MSVC_DEBUG";
buildConfig = "MSVC_DEBUG";
#elif DEBUG
buildConfig += "-DEBUG";
buildConfig = "DEBUG";
#endif
stringVersion = fmt::format("v{0}.{1}.{2}.{3}{4}", major, minor, patch, build, buildConfig);
}
};
const EngineVersion ENGINE_VERSION(0, 0, 1);
inline const EngineVersion ENGINE_VERSION(0, 0, 1);
}