From fb0e676ee8b65d69d621d4e840c0cef487f69bfc Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Tue, 12 Oct 2021 00:26:33 -0400 Subject: [PATCH] string: drop vector_copy_struct, obsoleted by ByteVector vector_copy_struct constructed a std::vector from a fixed-size struct. ByteVector replaces std::vector and has a template constructor which does the same thing as vector_copy_struct, so there is no longer a need for this function. Signed-off-by: Zygo Blaxell --- include/crucible/string.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/crucible/string.h b/include/crucible/string.h index 3c20eda..e16052b 100644 --- a/include/crucible/string.h +++ b/include/crucible/string.h @@ -19,15 +19,6 @@ namespace crucible { memset(that, 0, sizeof(Base)); } - // Copy a base class object (usually a C struct) into a vector - template - vector - vector_copy_struct(Base *that) - { - const uint8_t *begin_that = reinterpret_cast(static_cast(that)); - return vector(begin_that, begin_that + sizeof(Base)); - } - // int->hex conversion with sprintf string to_hex(uint64_t i);