作者ric2k1 (Ric)
看板EE_DSnP
标题Re: [问题] _historySize 疑问
时间Sun Oct 9 10:29:42 2011
※ 引述《victoret (戏言~)》之铭言:
: 在 moveToHistory、addHistory、retrieveHistory 三个的 comment 里面都有提及
: _historySize 这个数值
: 然而在 cmdParser.h 里面并没有这一项 data member...
: 在教授已经给的 retrieveHistory 里面也没有看到 _historySize
: Comment 里却有提到这个数值在 moveToHistory 和 retrieveHistory 里是不能被更动的
: 想请问一下这个变数是???
: 谢谢!
啊! 典型的改了 code 忘记 update comments...
基本上你都可以忽略他们。细节如下:
1. In "CmdParser::moveToHistory()"
==> Ignore the comments "The _historySize should NOT be changed."
and "_history.size() is now > _historySize"
2. In "CmdParser::addHistory()"
==> 原 comment:
"This function adds the string in _readBuf to the _history[_historySize]"
==> 改:
"This function adds the string in _readBuf to the _history. The size of
_history may or may not change. Depending on whether there is a temp
history string."
3. In "CmdParser::retrieveHistory()"
==> 改: "Do not change _history.size()"
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 1.160.25.115
1F:推 victoret:感谢教授! 10/09 10:32