From 9ad957cd180b65aa37f941973677624c52b65984 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 11 Jan 2014 19:14:21 -0700 Subject: [PATCH] Document and enforce invariant on Format::Token.divisor --- src/format/Token.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format/Token.h b/src/format/Token.h index 052cf80b41..f8b3c62264 100644 --- a/src/format/Token.h +++ b/src/format/Token.h @@ -35,7 +35,7 @@ public: left(false), space(false), zero(false), - divisor(0), + divisor(1), next(NULL) { data.string = NULL; } @@ -68,7 +68,7 @@ public: bool left; bool space; bool zero; - int divisor; + int divisor; // class invariant: MUST NOT be zero. Token *next; /* todo: move from linked list to array */ private: -- 2.47.2