Skip to content

Commit

Permalink
Merge pull request #1035 from Geode-solutions/BotellaA-patch-1
Browse files Browse the repository at this point in the history
fix(Cached Value): skip serialize to reduce file size
  • Loading branch information
MelchiorSchuh authored Oct 24, 2024
2 parents 7c973ee + 8a440aa commit 05e36c8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions include/geode/basic/cached_value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ namespace geode
template < typename Archive >
void serialize( Archive& archive )
{
archive.ext( *this, Growable< Archive, CachedValue >{
{ []( Archive& a, CachedValue& value ) {
a.value1b( value.computed_ );
a( value.value_ );
} } } );
archive.ext(
*this, Growable< Archive, CachedValue >{
{ []( Archive& a, CachedValue& value ) {
a.value1b( value.computed_ );
a( value.value_ );
},
[]( Archive& /*a*/, CachedValue& /*value*/ ) {
// skip serialize
} } } );
}

private:
Expand Down

0 comments on commit 05e36c8

Please sign in to comment.