From fa16a96443f4b3a7b62ca05338e88d0ce13a849f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Oct 2023 18:59:35 +0100 Subject: Move valueAs to BinaryColumn, implement with std::byteswap Removes the need to cast to/from BSD endian supported types. --- libpqpp/pq-column.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libpqpp/pq-column.h') 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 - inline T - valueAs() const - { - T v {}; - std::memcpy(&v, value(), sizeof(T)); - return v; - } - const char * value() const; std::size_t length() const; -- cgit v1.2.3