Regarding the following code: ----- void Text::selectWord(Cursor & cur, word_location loc) { LBUFERR(this == cur.text()); CursorSlice from = cur.top(); CursorSlice to = cur.top(); getWord(from, to, loc); -----
It is not easy to know whether "to" and "from" are equal to each other because cur.top() might return something different the second time. For readability purposes, I would prefer either LBUFERR(this == cur.text()); CursorSlice from, to; from = to = cur.top(); getWord(from, to, loc); or LBUFERR(this == cur.text()); CursorSlice from = cur.top(); CursorSlice to = from; getWord(from, to, loc); Does anyone else have a preference? Scott
signature.asc
Description: PGP signature