Skip to content

Commit b02bd47

Browse files
authored
Merge pull request #27 from vargalabs/19-refactor-restructure-include-directory
2 parents 80b4dcd + ec385c1 commit b02bd47

13 files changed

Lines changed: 14 additions & 20 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ target_link_libraries(libdecimal INTERFACE libdecimal::libbid_static )
5555
# ------------------------------------------------------------------------------
5656
# Installation
5757
# ------------------------------------------------------------------------------
58-
install( FILES ${CMAKE_SOURCE_DIR}/include/libdecimal.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
58+
install( FILES ${CMAKE_SOURCE_DIR}/include/decimal/* DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
5959
install( TARGETS libdecimal libbid_static EXPORT libdecimal_targets)
6060
install( FILES ${libbid_static_archive} DESTINATION ${CMAKE_INSTALL_LIBDIR} )
6161
install( DIRECTORY ${libbid_static_include_dir}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libbid FILES_MATCHING PATTERN "*.h")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ inline BID_UINT128 to_bid128(unsigned __int128 x) noexcept {
4040
namespace math::bid {
4141
using uint128_t = BID_UINT128;
4242
enum struct category : unsigned char {
43-
positive = 0b0000, negative = 0b0001, pinf = 0b0010, ninf = 0b0011, nan = 0b0100
43+
positive = 0b0000, negative = 0b0001, pinf = 0b0010, ninf = 0b0011, nan = 0b0100, zero = 0b1000
4444
};
4545
template<class T>
4646
inline std::string print(bool signbit, T mantissa, int exponent, char* buffer, size_t size) {

test/algebraic-identities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <type_traits>
77

88
#include <doctest/all>
9-
#include "decimal.hpp"
9+
#include <decimal/bid.hpp>
1010

1111
namespace {
1212
template <typename T> struct tolerance_t;

test/constants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
66
#include <doctest/all>
77

8-
#include "decimal.hpp"
8+
#include <decimal/bid.hpp>
99

1010
namespace {
1111
template <typename T>

test/decimal-bid-spec.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44

55
#include <sstream>
66
#include <string>
7-
#include <tuple>
8-
#include <type_traits>
9-
#include <limits>
107
#include <format>
118

129
#include <doctest/all>
13-
#include "decimal.hpp"
10+
#include <decimal/bid.hpp>
11+
1412

1513
namespace test {
1614
using dec32_t = math::decimal_t<std::uint32_t>;

test/decimal-display.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
#include <format>
1010

1111
#include <doctest/all>
12-
#include "decimal.hpp"
13-
12+
#include <decimal/bid.hpp>
1413
namespace test {
1514
using dec32_t = math::decimal_t<std::uint32_t>;
1615
using dec64_t = math::decimal_t<std::uint64_t>;

test/decimal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
55
#include <stdint.h>
66
#include <doctest/all>
7-
#include <decimal.hpp>
7+
#include <decimal/bid.hpp>
88

99
#define TRACE std::cerr
1010
#define uint128_t __uint128_t

test/float-conversion.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
#include <cstdint>
88
#include <limits>
99
#include <string>
10-
#include <type_traits>
1110

1211
#include <doctest/all>
13-
#include "decimal.hpp"
12+
#include <decimal/bid.hpp>
1413

1514
namespace test {
1615
using dec32_t = math::decimal_t<std::uint32_t>;

test/import-export.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
#include <string>
77
#include <string_view>
8-
#include <limits>
98
#include <doctest/all>
10-
#include "decimal.hpp"
9+
#include <decimal/bid.hpp>
1110

1211
namespace test {
1312
using dec32_t = math::decimal_t<std::uint32_t>;

test/ops-add-sub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <string>
77
#include <doctest/all>
8-
#include "decimal.hpp"
8+
#include <decimal/bid.hpp>
99

1010
namespace test {
1111
using dec32_t = math::decimal_t<std::uint32_t>;

0 commit comments

Comments
 (0)