diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 11:00:35 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 11:00:35 +0200 |
commit | 15f29d4852e01bc6c6fb802ee818d991142e2f36 (patch) | |
tree | 22c3f9a2c484ad0ed5047a23633fabf7190d3f51 /src | |
parent | f7f909522a79b3467c730e1fcaf50f19d6c88e0b (diff) | |
download | fork-ledger-15f29d4852e01bc6c6fb802ee818d991142e2f36.tar.gz fork-ledger-15f29d4852e01bc6c6fb802ee818d991142e2f36.tar.bz2 fork-ledger-15f29d4852e01bc6c6fb802ee818d991142e2f36.zip |
Refactor flag and pstream related types into ledger namespace
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.h | 2 | ||||
-rw-r--r-- | src/flags.h | 3 | ||||
-rw-r--r-- | src/pstream.h | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/amount.h b/src/amount.h index 8d0018d7..45e5a68f 100644 --- a/src/amount.h +++ b/src/amount.h @@ -76,7 +76,7 @@ enum parse_flags_enum_t { PARSE_SOFT_FAIL = 0x80 }; -typedef basic_flags_t<parse_flags_enum_t, uint_least8_t> parse_flags_t; +typedef ledger::basic_flags_t<parse_flags_enum_t, uint_least8_t> parse_flags_t; /** * @brief Encapsulate infinite-precision commoditized amounts diff --git a/src/flags.h b/src/flags.h index fb7096c0..cd01fc29 100644 --- a/src/flags.h +++ b/src/flags.h @@ -41,6 +41,7 @@ */ #pragma once +namespace ledger { template <typename T = boost::uint_least8_t, typename U = T> class supports_flags @@ -182,3 +183,5 @@ public: _flags.drop_flags(arg); } }; + +} // namespace ledger diff --git a/src/pstream.h b/src/pstream.h index 2502fdac..a012e628 100644 --- a/src/pstream.h +++ b/src/pstream.h @@ -44,6 +44,8 @@ //#include <istream> //#include <streambuf> +namespace ledger { + class ptristream : public std::istream { class ptrinbuf : public std::streambuf @@ -109,3 +111,5 @@ public: rdbuf(&buf); } }; + +} // namespace ledger |