From b8d4ad27704ee85e91318c5d639d82c984c4595c Mon Sep 17 00:00:00 2001 From: riasc Date: Sun, 13 Oct 2024 12:12:25 -0500 Subject: [PATCH] removed return value in TypeRegistry --- include/genogrove/TypeRegistry.hpp | 2 +- src/TypeRegistry.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/genogrove/TypeRegistry.hpp b/include/genogrove/TypeRegistry.hpp index 4bf28b5..7f5b188 100644 --- a/include/genogrove/TypeRegistry.hpp +++ b/include/genogrove/TypeRegistry.hpp @@ -76,7 +76,7 @@ namespace genogrove { // serialize and deserialize the TypeRegistry static void serialize(std::ostream& os); - static std::shared_ptr deserialize(std::istream& is); + static void deserialize(std::istream& is); private: diff --git a/src/TypeRegistry.cpp b/src/TypeRegistry.cpp index b771423..849a853 100644 --- a/src/TypeRegistry.cpp +++ b/src/TypeRegistry.cpp @@ -16,14 +16,15 @@ namespace genogrove { } } - std::shared_ptr TypeRegistry::deserialize(std::istream& is) { + void TypeRegistry::deserialize(std::istream& is) { size_t typeCount; - is.read(reinterpret_cast(&typeCount), sizeof(typeCount)); + is.read(reinterpret_cast(&typeCount), sizeof(typeCount)); - for(size_t i=0; i < typeCount; ++i) { + for (size_t i = 0; i < typeCount; ++i) { size_t typeNameLength; - is.read(reinterpret_cast(&typeNameLength), sizeof(typeNameLength)); + is.read(reinterpret_cast(&typeNameLength), sizeof(typeNameLength)); std::string typeName(typeNameLength, '\0'); is.read(&typeName[0], typeNameLength); } + } } \ No newline at end of file