DFortune

Unix fortune-cookie parser written in D
git clone git://xatko.vsos.ethz.ch/DFortune.git
Log | Files | Refs

commit 8e8cabf50b94a55c44f392df93068d85fe69528b
parent eeb22d6936a6cb01a186ea9035e78f3b1acd4dd2
Author: Dominik Schmidt <das1993@hotmail.com>
Date:   Sat, 25 Jul 2015 23:07:42 +0200

Improve const-correctness.

Diffstat:
dfortune.d | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dfortune.d b/dfortune.d @@ -109,7 +109,7 @@ class Fortune : RandomAccessFinite!(string){ c.end=end; return c; } - @property size_t length(){ + @property size_t length() const{ return header.numstr-pos; } Fortune opSlice(size_t a, size_t b){ @@ -141,7 +141,7 @@ class Fortune : RandomAccessFinite!(string){ string moveFront(){ return readFortune(pos); } - @property bool empty(){ + @property bool empty() const{ return (pos>end); } @property string front(){