Browse Source

include guards and macros in general: removed superfluous comments

Michele Caini 6 years ago
parent
commit
c51c88a17c

+ 38 - 31
src/entt/config/config.h

@@ -3,54 +3,61 @@
 
 
 #ifndef ENTT_NOEXCEPT
-#define ENTT_NOEXCEPT noexcept
-#endif // ENTT_NOEXCEPT
+#   define ENTT_NOEXCEPT noexcept
+#endif
 
 
 #ifndef ENTT_HS_SUFFIX
-#define ENTT_HS_SUFFIX _hs
-#endif // ENTT_HS_SUFFIX
+#   define ENTT_HS_SUFFIX _hs
+#endif
 
 
 #ifndef ENTT_HWS_SUFFIX
-#define ENTT_HWS_SUFFIX _hws
-#endif // ENTT_HWS_SUFFIX
+#   define ENTT_HWS_SUFFIX _hws
+#endif
 
 
 #ifndef ENTT_USE_ATOMIC
-#define ENTT_MAYBE_ATOMIC(Type) Type
-#else // ENTT_USE_ATOMIC
-#include <atomic>
-#define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
-#endif // ENTT_USE_ATOMIC
-
-
-#ifndef ENTT_DISABLE_ETO
-#include <type_traits>
-#define ENTT_ENABLE_ETO(Type) std::is_empty_v<Type>
-#else // ENTT_DISABLE_ETO
-// sfinae-friendly definition
-#define ENTT_ENABLE_ETO(Type) (false && std::is_empty_v<Type>)
-#endif // ENTT_DISABLE_ETO
+#   define ENTT_MAYBE_ATOMIC(Type) Type
+#else
+#   include <atomic>
+#   define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
+#endif
 
 
 #ifndef ENTT_ID_TYPE
-#include <cstdint>
-#define ENTT_ID_TYPE std::uint32_t
-#endif // ENTT_ID_TYPE
+#   include <cstdint>
+#   define ENTT_ID_TYPE std::uint32_t
+#endif
 
 
 #ifndef ENTT_PAGE_SIZE
-#define ENTT_PAGE_SIZE 32768
-#endif // ENTT_PAGE_SIZE
+#   define ENTT_PAGE_SIZE 32768
+#endif
 
 
 #ifndef ENTT_DISABLE_ASSERT
-#include <cassert>
-#define ENTT_ASSERT(condition) assert(condition)
-#else // ENTT_DISABLE_ASSERT
-#define ENTT_ASSERT(...) ((void)0)
-#endif // ENTT_DISABLE_ASSERT
+#   include <cassert>
+#   define ENTT_ASSERT(condition) assert(condition)
+#else
+#   define ENTT_ASSERT(...) ((void)0)
+#endif
+
+
+#ifndef ENTT_DISABLE_ETO
+#   include <type_traits>
+#   define ENTT_ENABLE_ETO(Type) std::is_empty_v<Type>
+#else
+#   // sfinae-friendly definition
+#   define ENTT_ENABLE_ETO(Type) (false && std::is_empty_v<Type>)
+#endif
+
+
+#if defined _MSC_VER
+#   define ENTT_PRETTY_FUNCTION __FUNCSIG__
+#elif defined __GNUC__
+#   define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#endif
 
 
-#endif // ENTT_CONFIG_CONFIG_H
+#endif

+ 1 - 1
src/entt/config/version.h

@@ -8,4 +8,4 @@
 #define ENTT_VERSION_PATCH 0
 
 
-#endif // ENTT_CONFIG_VERSION_H
+#endif

+ 1 - 1
src/entt/core/algorithm.hpp

@@ -140,4 +140,4 @@ struct radix_sort {
 }
 
 
-#endif // ENTT_CORE_ALGORITHM_HPP
+#endif

+ 1 - 1
src/entt/core/attribute.h

@@ -30,4 +30,4 @@
 #endif
 
 
-#endif // ENTT_LIB_ATTRIBUTE_H
+#endif

+ 1 - 1
src/entt/core/family.hpp

@@ -33,4 +33,4 @@ public:
 }
 
 
-#endif // ENTT_CORE_FAMILY_HPP
+#endif

+ 1 - 1
src/entt/core/hashed_string.hpp

@@ -251,4 +251,4 @@ constexpr entt::hashed_wstring operator"" ENTT_HWS_SUFFIX(const wchar_t *str, st
 }
 
 
-#endif // ENTT_CORE_HASHED_STRING_HPP
+#endif

+ 1 - 1
src/entt/core/ident.hpp

@@ -62,4 +62,4 @@ public:
 }
 
 
-#endif // ENTT_CORE_IDENT_HPP
+#endif

+ 1 - 1
src/entt/core/monostate.hpp

@@ -58,4 +58,4 @@ inline monostate<Value> monostate_v = {};
 }
 
 
-#endif // ENTT_CORE_MONOSTATE_HPP
+#endif

+ 1 - 1
src/entt/core/type_info.hpp

@@ -69,4 +69,4 @@ ENTT_ID_TYPE type_info<Type, Cond>::id() ENTT_NOEXCEPT {
 }
 
 
-#endif // ENTT_CORE_TYPE_INFO_HPP
+#endif

+ 1 - 1
src/entt/core/type_traits.hpp

@@ -186,4 +186,4 @@ constexpr auto is_equality_comparable_v = is_equality_comparable<Type>::value;
     static_assert(true)
 
 
-#endif // ENTT_CORE_TYPE_TRAITS_HPP
+#endif

+ 1 - 1
src/entt/core/utility.hpp

@@ -102,4 +102,4 @@ private:
 }
 
 
-#endif // ENTT_CORE_UTILITY_HPP
+#endif

+ 1 - 1
src/entt/entity/actor.hpp

@@ -203,4 +203,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_ACTOR_HPP
+#endif

+ 1 - 1
src/entt/entity/entity.hpp

@@ -171,4 +171,4 @@ constexpr auto null = internal::null{};
 }
 
 
-#endif // ENTT_ENTITY_ENTITY_HPP
+#endif

+ 1 - 1
src/entt/entity/fwd.hpp

@@ -86,4 +86,4 @@ using group = basic_group<entity, Types...>;
 }
 
 
-#endif // ENTT_ENTITY_FWD_HPP
+#endif

+ 1 - 1
src/entt/entity/group.hpp

@@ -856,4 +856,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_GROUP_HPP
+#endif

+ 1 - 1
src/entt/entity/helper.hpp

@@ -136,4 +136,4 @@ using tag = std::integral_constant<ENTT_ID_TYPE, Value>;
 }
 
 
-#endif // ENTT_ENTITY_HELPER_HPP
+#endif

+ 1 - 1
src/entt/entity/observer.hpp

@@ -437,4 +437,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_OBSERVER_HPP
+#endif

+ 1 - 1
src/entt/entity/registry.hpp

@@ -1727,4 +1727,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_REGISTRY_HPP
+#endif

+ 1 - 1
src/entt/entity/runtime_view.hpp

@@ -258,4 +258,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_RUNTIME_VIEW_HPP
+#endif

+ 1 - 1
src/entt/entity/snapshot.hpp

@@ -602,4 +602,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_SNAPSHOT_HPP
+#endif

+ 1 - 1
src/entt/entity/sparse_set.hpp

@@ -633,4 +633,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_SPARSE_SET_HPP
+#endif

+ 1 - 1
src/entt/entity/storage.hpp

@@ -734,4 +734,4 @@ struct storage: basic_storage<Entity, Type> {};
 }
 
 
-#endif // ENTT_ENTITY_STORAGE_HPP
+#endif

+ 1 - 1
src/entt/entity/utility.hpp

@@ -43,4 +43,4 @@ constexpr get_t<Type...> get{};
 }
 
 
-#endif // ENTT_ENTITY_UTILITY_HPP
+#endif

+ 1 - 1
src/entt/entity/view.hpp

@@ -800,4 +800,4 @@ private:
 }
 
 
-#endif // ENTT_ENTITY_VIEW_HPP
+#endif

+ 1 - 1
src/entt/locator/locator.hpp

@@ -108,4 +108,4 @@ private:
 }
 
 
-#endif // ENTT_LOCATOR_LOCATOR_HPP
+#endif

+ 1 - 1
src/entt/meta/factory.hpp

@@ -871,4 +871,4 @@ resolve(Op op) {
 }
 
 
-#endif // ENTT_META_FACTORY_HPP
+#endif

+ 1 - 1
src/entt/meta/meta.hpp

@@ -1538,4 +1538,4 @@ inline meta_type meta_func::arg(size_type index) const ENTT_NOEXCEPT {
 }
 
 
-#endif // ENTT_META_META_HPP
+#endif

+ 1 - 1
src/entt/meta/policy.hpp

@@ -24,4 +24,4 @@ struct as_void_t {};
 }
 
 
-#endif // ENTT_META_POLICY_HPP
+#endif

+ 1 - 1
src/entt/process/process.hpp

@@ -337,4 +337,4 @@ struct process_adaptor: process<process_adaptor<Func, Delta>, Delta>, private Fu
 }
 
 
-#endif // ENTT_PROCESS_PROCESS_HPP
+#endif

+ 1 - 1
src/entt/process/scheduler.hpp

@@ -297,4 +297,4 @@ private:
 }
 
 
-#endif // ENTT_PROCESS_SCHEDULER_HPP
+#endif

+ 1 - 1
src/entt/resource/cache.hpp

@@ -237,4 +237,4 @@ private:
 }
 
 
-#endif // ENTT_RESOURCE_CACHE_HPP
+#endif

+ 1 - 1
src/entt/resource/fwd.hpp

@@ -21,4 +21,4 @@ class loader;
 }
 
 
-#endif // ENTT_RESOURCE_FWD_HPP
+#endif

+ 1 - 1
src/entt/resource/handle.hpp

@@ -105,4 +105,4 @@ private:
 }
 
 
-#endif // ENTT_RESOURCE_HANDLE_HPP
+#endif

+ 1 - 1
src/entt/resource/loader.hpp

@@ -62,4 +62,4 @@ class loader {
 }
 
 
-#endif // ENTT_RESOURCE_LOADER_HPP
+#endif

+ 1 - 1
src/entt/signal/delegate.hpp

@@ -354,4 +354,4 @@ delegate(connect_arg_t<Candidate>, Type *) ENTT_NOEXCEPT
 }
 
 
-#endif // ENTT_SIGNAL_DELEGATE_HPP
+#endif

+ 1 - 1
src/entt/signal/dispatcher.hpp

@@ -243,4 +243,4 @@ private:
 }
 
 
-#endif // ENTT_SIGNAL_DISPATCHER_HPP
+#endif

+ 1 - 1
src/entt/signal/emitter.hpp

@@ -330,4 +330,4 @@ private:
 }
 
 
-#endif // ENTT_SIGNAL_EMITTER_HPP
+#endif

+ 1 - 1
src/entt/signal/fwd.hpp

@@ -34,4 +34,4 @@ class sigh;
 }
 
 
-#endif // ENTT_SIGNAL_FWD_HPP
+#endif

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -577,4 +577,4 @@ sink(sigh<Ret(Args...)> &) ENTT_NOEXCEPT -> sink<Ret(Args...)>;
 }
 
 
-#endif // ENTT_SIGNAL_SIGH_HPP
+#endif