Skip to content

Commit

Permalink
removed return value in TypeRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
riasc committed Oct 13, 2024
1 parent 05d2af5 commit b8d4ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/genogrove/TypeRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace genogrove {

// serialize and deserialize the TypeRegistry
static void serialize(std::ostream& os);
static std::shared_ptr<AnyBase> deserialize(std::istream& is);
static void deserialize(std::istream& is);


private:
Expand Down
9 changes: 5 additions & 4 deletions src/TypeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ namespace genogrove {
}
}

std::shared_ptr<AnyBase> TypeRegistry::deserialize(std::istream& is) {
void TypeRegistry::deserialize(std::istream& is) {
size_t typeCount;
is.read(reinterpret_cast<char*>(&typeCount), sizeof(typeCount));
is.read(reinterpret_cast<char *>(&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<char*>(&typeNameLength), sizeof(typeNameLength));
is.read(reinterpret_cast<char *>(&typeNameLength), sizeof(typeNameLength));
std::string typeName(typeNameLength, '\0');
is.read(&typeName[0], typeNameLength);
}
}
}

0 comments on commit b8d4ad2

Please sign in to comment.