aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-04-04 00:03:37 +0100
committerGitHub2018-04-04 00:03:37 +0100
commitbb243681fa6f9d05e4e19757431310f5cbb61831 (patch)
tree1ecfdbe1883df6325007e21af84ffed92d53888a /src/main/game/global_cache.cpp
parentMerge pull request #46 from thecharlesblake/zero-seed-bugfix (diff)
parentRe-add schemas for rule and deal parsing (diff)
downloadmetasol-bb243681fa6f9d05e4e19757431310f5cbb61831.tar.gz
metasol-bb243681fa6f9d05e4e19757431310f5cbb61831.zip

Merge pull request #47 from thecharlesblake/re-add-schema

Re-add schemas for rule and deal parsing

Diffstat (limited to 'src/main/game/global_cache.cpp')
-rw-r--r--src/main/game/global_cache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp
index 048cbc9..29e8d25 100644
--- a/src/main/game/global_cache.cpp
+++ b/src/main/game/global_cache.cpp
@@ -20,6 +20,8 @@ typedef sol_rules::stock_deal_type sdt;
///////////////////////
cached_game_state::cached_game_state(const game_state& gs) {
+ data.reserve(52+18); // Enough for each card and up to 18 piles
+
if (gs.rules.hole) {
#ifdef NO_REDUCED_STATE
add_pile(gs.hole, gs);