From 3073a88cd16b6e85401363c814e5ac7ae11b9270 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Sun, 25 Feb 2024 15:46:47 +0100 Subject: Use "#pragma once" instead of include guards --- source/core/StarConfig.hpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'source/core/StarConfig.hpp') diff --git a/source/core/StarConfig.hpp b/source/core/StarConfig.hpp index 5a95569..fffc7da 100644 --- a/source/core/StarConfig.hpp +++ b/source/core/StarConfig.hpp @@ -1,5 +1,4 @@ -#ifndef STAR_CONFIG_HPP -#define STAR_CONFIG_HPP +#pragma once #include "StarPch.hpp" @@ -75,25 +74,23 @@ typedef int64_t StreamOffset; #define STAR_CLASS(ClassName) \ class ClassName; \ - typedef std::shared_ptr ClassName##Ptr; \ - typedef std::shared_ptr ClassName##ConstPtr; \ - typedef std::weak_ptr ClassName##WeakPtr; \ - typedef std::weak_ptr ClassName##ConstWeakPtr; \ - typedef std::unique_ptr ClassName##UPtr; \ - typedef std::unique_ptr ClassName##ConstUPtr + using ClassName##Ptr = std::shared_ptr; \ + using ClassName##ConstPtr = std::shared_ptr; \ + using ClassName##WeakPtr = std::weak_ptr; \ + using ClassName##ConstWeakPtr = std::weak_ptr; \ + using ClassName##UPtr = std::unique_ptr; \ + using ClassName##ConstUPtr = std::unique_ptr #define STAR_STRUCT(StructName) \ struct StructName; \ - typedef std::shared_ptr StructName##Ptr; \ - typedef std::shared_ptr StructName##ConstPtr; \ - typedef std::weak_ptr StructName##WeakPtr; \ - typedef std::weak_ptr StructName##ConstWeakPtr; \ - typedef std::unique_ptr StructName##UPtr; \ - typedef std::unique_ptr StructName##ConstUPtr + using StructName##Ptr = std::shared_ptr; \ + using StructName##ConstPtr = std::shared_ptr; \ + using StructName##WeakPtr = std::weak_ptr; \ + using StructName##ConstWeakPtr = std::weak_ptr; \ + using StructName##UPtr = std::unique_ptr; \ + using StructName##ConstUPtr = std::unique_ptr #define STAR_QUOTE(name) #name #define STAR_STR(macro) STAR_QUOTE(macro) } - -#endif -- cgit v1.2.3