[Scummvm-devel] Questions about the new readLine functions
Ori Avtalion
ori at avtalion.name
Sat Sep 6 16:47:14 CEST 2008
Hi,
While adjusting my code to the new readLine changes, I noticed some
inconsistencies and problems:
1) readLine_NEW retains the newline in the returned buffer, while
readLine drops the newline from the returned String.
What's the reasoning behind this difference? Isn't the string-returning
readLine supposed to be nothing but a helpful wrapper around readLine_NEW?
2) There's no efficient way (i.e. by not scanning the whole buffer) of
dropping the newline from the result of readLine_NEW. Seems like the
only way to drop the newline is to use Common::String -- why should that
be mandatory? How about adding a retainNewLine boolean (defaults to
'true') to readLine_NEW?
-Ori
More information about the Scummvm-devel
mailing list