Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > Abdelrazak Younes <[EMAIL PROTECTED]> writes:
| > | Comments?
| > I thought avalialbe a quite nice logical name to use, so I am not
| > sure
| > that the code gets any cleaner by doing this.
| 
| I prefer to know exactly what available() mean and buffer gives me
| exactly that. I can replace the "if (buffer())" with "if (buffer()!=
| 0)" if you don't like the implicit cast. This will still be better
| than available() IMO.

if (ptr) is a c-idom so that is quite ok.

| > | Index: src/frontends/controllers/Kernel.C
| > | ===================================================================
| > | --- src/frontends/controllers/Kernel.C    (revision 15012)
| > | +++ src/frontends/controllers/Kernel.C    (working copy)
| > | @@ -51,7 +51,7 @@
| > |  {
| > |   if (!lyxview_.view())
| > |           return false;
| > | - return lyxview_.view()->available();
| > | + return lyxview_.view()->buffer();
| > This one in particular I guess.
| 
| Could be replaced by
| 
| +     return lyxview_.view()->buffer() != 0;
| 
| if you want. I don't really care about either style.

In this particular case the c-idom is not so strong, so yes, I'd
prefere the explict check. Please do that.


-- 
        Lgb

Reply via email to