diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-08 18:59:35 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-08 18:59:35 +0100 |
commit | fa16a96443f4b3a7b62ca05338e88d0ce13a849f (patch) | |
tree | 3e0a682889caed767990861c4b320a91b83849e8 /libpqpp/pq-column.h | |
parent | Move to C++23 (for std::byteswap) (diff) | |
download | libdbpp-postgresql-fa16a96443f4b3a7b62ca05338e88d0ce13a849f.tar.bz2 libdbpp-postgresql-fa16a96443f4b3a7b62ca05338e88d0ce13a849f.tar.xz libdbpp-postgresql-fa16a96443f4b3a7b62ca05338e88d0ce13a849f.zip |
Move valueAs to BinaryColumn, implement with std::byteswap
Removes the need to cast to/from BSD endian supported types.
Diffstat (limited to 'libpqpp/pq-column.h')
-rw-r--r-- | libpqpp/pq-column.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/libpqpp/pq-column.h b/libpqpp/pq-column.h index 6bf2669..fa4a78a 100644 --- a/libpqpp/pq-column.h +++ b/libpqpp/pq-column.h @@ -17,15 +17,6 @@ namespace PQ { void apply(DB::HandleField &) const override; protected: - template<typename T> - inline T - valueAs() const - { - T v {}; - std::memcpy(&v, value(), sizeof(T)); - return v; - } - const char * value() const; std::size_t length() const; |