Skip to content

Commit 05e36c8

Browse files
Merge pull request #1035 from Geode-solutions/BotellaA-patch-1
fix(Cached Value): skip serialize to reduce file size
2 parents 7c973ee + 8a440aa commit 05e36c8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

include/geode/basic/cached_value.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,15 @@ namespace geode
8080
template < typename Archive >
8181
void serialize( Archive& archive )
8282
{
83-
archive.ext( *this, Growable< Archive, CachedValue >{
84-
{ []( Archive& a, CachedValue& value ) {
85-
a.value1b( value.computed_ );
86-
a( value.value_ );
87-
} } } );
83+
archive.ext(
84+
*this, Growable< Archive, CachedValue >{
85+
{ []( Archive& a, CachedValue& value ) {
86+
a.value1b( value.computed_ );
87+
a( value.value_ );
88+
},
89+
[]( Archive& /*a*/, CachedValue& /*value*/ ) {
90+
// skip serialize
91+
} } } );
8892
}
8993

9094
private:

0 commit comments

Comments
 (0)