From f63f0f2a9f008fc7a42b0a981855c112194a0308 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:07:34 -0600 Subject: [PATCH 1/2] Remove boost --- CMakeLists.txt | 3 --- README.md | 2 -- cmake/config.cmake.in | 1 - include/RE/B/BSTHashMap.h | 37 ++++++++++++++++++------------------- include/SKSE/Impl/PCH.h | 1 - vcpkg.json | 1 - 6 files changed, 18 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a1852c05..1a08923da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") endif() find_package(binary_io REQUIRED CONFIG) -find_package(Boost MODULE REQUIRED) find_package(spdlog REQUIRED CONFIG) include(cmake/sourcelist.cmake) @@ -38,7 +37,6 @@ add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}") target_compile_definitions( "${PROJECT_NAME}" PUBLIC - BOOST_STL_INTERFACES_DISABLE_CONCEPTS WINVER=0x0601 # windows 7, minimum supported version by skyrim special edition _WIN32_WINNT=0x0601 "$<$:SKSE_SUPPORT_XBYAK=1>" @@ -95,7 +93,6 @@ target_link_libraries( "${PROJECT_NAME}" PUBLIC binary_io::binary_io - Boost::headers spdlog::spdlog Version.lib ) diff --git a/README.md b/README.md index 759cc741c..ed3755510 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ ## Build Dependencies -* [Boost](https://www.boost.org/) - * Stl_interfaces * [spdlog](https://github.com/gabime/spdlog) * [Visual Studio Community 2019 16.10.0 Preview 3.0](https://visualstudio.microsoft.com/vs/preview/) * Desktop development with C++ diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 64a949649..ffecc2033 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -2,5 +2,4 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") include(CMakeFindDependencyMacro) find_dependency(binary_io CONFIG) -find_dependency(Boost MODULE) find_dependency(spdlog CONFIG) diff --git a/include/RE/B/BSTHashMap.h b/include/RE/B/BSTHashMap.h index 323317e6a..1059802ec 100644 --- a/include/RE/B/BSTHashMap.h +++ b/include/RE/B/BSTHashMap.h @@ -113,25 +113,14 @@ namespace RE }; template - class iterator_base : - public boost::stl_interfaces::iterator_interface< - iterator_base, - std::forward_iterator_tag, - U> + class iterator_base { - private: - using super = - boost::stl_interfaces::iterator_interface< - iterator_base, - std::forward_iterator_tag, - U>; - public: - using difference_type = typename super::difference_type; - using value_type = typename super::value_type; - using pointer = typename super::pointer; - using reference = typename super::reference; - using iterator_category = typename super::iterator_category; + using difference_type = std::ptrdiff_t; + using value_type = std::remove_const_t; + using pointer = value_type*; + using reference = value_type&; + using iterator_category = std::forward_iterator_tag; iterator_base() = default; ~iterator_base() = default; @@ -176,7 +165,17 @@ namespace RE return *this; } - using super::operator++; + iterator_base operator++(int) noexcept + { + iterator_base result = *this; + ++result; + return result; + } + + [[nodiscard]] pointer operator->() const noexcept + { + return &**this; + } protected: friend class BSTScatterTable; @@ -740,7 +739,7 @@ namespace RE namespace detail { using _dummy_bsthashmap = BSTHashMap; - BOOST_STL_INTERFACES_STATIC_ASSERT_CONCEPT(_dummy_bsthashmap::iterator, std::forward_iterator); + static_assert(std::forward_iterator<_dummy_bsthashmap::iterator>); } template < diff --git a/include/SKSE/Impl/PCH.h b/include/SKSE/Impl/PCH.h index 58dbd2ba2..d38454d65 100644 --- a/include/SKSE/Impl/PCH.h +++ b/include/SKSE/Impl/PCH.h @@ -59,7 +59,6 @@ static_assert( #pragma warning(push) #include -#include #include #include #pragma warning(pop) diff --git a/vcpkg.json b/vcpkg.json index a6ee45c80..e1afdea7b 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,7 +6,6 @@ "license": "MIT", "supports": "windows & x64", "dependencies": [ - "boost-stl-interfaces", "fmt", "rsm-binary-io", "spdlog" From 3b7a36d485fbdff026946edcece4db7e79e7b946 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:09:22 -0600 Subject: [PATCH 2/2] .gitignore --- .gitignore | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 50253ac97..50a52675a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,12 @@ -/build* +# dot folders +.vs/ +.vscode/ +.xmake/ + +# folders +build/ +out/ + +# files +*.zip CMakeUserPresets.json -/out* -/.vs*