diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 15d2fb073ef67e7fb5642248c455e2e89b7c8a5e..b76d5e8ffa6ba5c17155732f67d374102be39122 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -13945,10 +13945,10 @@ Although `cached_computation` works perfectly in a single-threaded environment, ##### Example, good struct ComputationCache { - double cached_x = 0.0; + int cached_x = 0; double cached_result = COMPUTATION_OF_ZERO; - double compute(double x) { + double compute(int x) { if (cached_x != x) { cached_x = x; cached_result = computation(x);