From 8bd48bd9762a5303ecfbf160129d178c942fbb3c Mon Sep 17 00:00:00 2001 From: Bart Vandewoestyne Date: Tue, 11 Jun 2024 23:11:35 +0200 Subject: [PATCH] Implement GlyphContext::Next(int step). --- Structural_Patterns/Flyweight/GlyphContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Structural_Patterns/Flyweight/GlyphContext.cpp b/Structural_Patterns/Flyweight/GlyphContext.cpp index 4c14ed2..dd84f0f 100644 --- a/Structural_Patterns/Flyweight/GlyphContext.cpp +++ b/Structural_Patterns/Flyweight/GlyphContext.cpp @@ -9,8 +9,8 @@ GlyphContext::~GlyphContext() void GlyphContext::Next(int step) { - // TODO: increment _index as the traversal proceeds - // (see book page 202). + // Increment _index as the traversal proceeds (see book page 202). + _index += step; } void GlyphContext::Insert(int quantity1)