From 4fc84753f84d47207904c17716dc8ce09142d54e Mon Sep 17 00:00:00 2001 From: Albin Johansson Date: Sat, 14 Oct 2023 22:09:14 +0200 Subject: [PATCH] Tweak DLL visibility stuff --- modules/CMakeLists.txt | 1 + modules/core/inc/tactile/core/prelude.hpp | 4 ++-- modules/editor/inc/tactile/editor/cmd/command_stack.hpp | 6 +++--- modules/editor/src/tactile/editor/cmd/command_stack.cpp | 5 ++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index e63a4c8588..9a584440ae 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -15,6 +15,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ) else () set(TACTILE_COMPILE_OPTIONS + -fvisibility=hidden -Wall -Wextra -Wpedantic diff --git a/modules/core/inc/tactile/core/prelude.hpp b/modules/core/inc/tactile/core/prelude.hpp index e6fe5b4f1f..563c8b21b8 100644 --- a/modules/core/inc/tactile/core/prelude.hpp +++ b/modules/core/inc/tactile/core/prelude.hpp @@ -77,8 +77,8 @@ #define TACTILE_DLL_EXPORT __attribute__((__visibility__("default"))) #define TACTILE_DLL_IMPORT #elif TACTILE_COMPILER_GCC - #define TACTILE_DLL_EXPORT __attribute__((dllexport)) - #define TACTILE_DLL_IMPORT __attribute__((dllimport)) + #define TACTILE_DLL_EXPORT __attribute__((visibility("default"))) + #define TACTILE_DLL_IMPORT #else #define TACTILE_DLL_EXPORT #define TACTILE_DLL_IMPORT diff --git a/modules/editor/inc/tactile/editor/cmd/command_stack.hpp b/modules/editor/inc/tactile/editor/cmd/command_stack.hpp index 7064eeebb9..260e36cc5b 100644 --- a/modules/editor/inc/tactile/editor/cmd/command_stack.hpp +++ b/modules/editor/inc/tactile/editor/cmd/command_stack.hpp @@ -170,10 +170,10 @@ class CommandStack final { void _store(Unique cmd); /** \brief Removes the oldest command from the stack, i.e., the one at the bottom. */ - void _remove_oldest_command(); + TACTILE_EDITOR_API void _remove_oldest_command(); /** \brief Removes all commands to the right of the current index (newer ones). */ - void _remove_commands_after_current_index(); + TACTILE_EDITOR_API void _remove_commands_after_current_index(); void _reset_or_decrease_clean_index(); @@ -181,7 +181,7 @@ class CommandStack final { void _reset_or_decrease_current_index(); /** \brief Shifts the current index to the right (to a newer command). */ - void _increase_current_index(); + TACTILE_EDITOR_API void _increase_current_index(); [[nodiscard]] auto _get_next_command_index() const -> usize; }; diff --git a/modules/editor/src/tactile/editor/cmd/command_stack.cpp b/modules/editor/src/tactile/editor/cmd/command_stack.cpp index 2dd8ee1cef..f50c4ad2ee 100644 --- a/modules/editor/src/tactile/editor/cmd/command_stack.cpp +++ b/modules/editor/src/tactile/editor/cmd/command_stack.cpp @@ -7,9 +7,8 @@ namespace tactile { CommandStack::CommandStack(const usize capacity) - : mCapacity {capacity} -{ -} + : mCapacity {capacity} +{} void CommandStack::clear() {