Add IsNull() to class CAutoFile and remove operator ! #5089

pull rdponticelli wants to merge 1 commits into bitcoin:master from Criptomonedas:cautofileisnull changing 3 files +7 −7
  1. rdponticelli commented at 3:51 AM on October 16, 2014: contributor

    As suggested by @TheBlueMatt and @laanwj in #4701.

  2. in src/serialize.h:None in 6d7580aa6f outdated
    1121 | @@ -1122,8 +1122,7 @@ class CAutoFile
    1122 |      FILE& operator*()           { return *file; }
    1123 |      FILE** operator&()          { return &file; }
    1124 |      FILE* operator=(FILE* pnew) { return file = pnew; }
    1125 | -    bool operator!()            { return (file == NULL); }
    1126 | -
    1127 | +    bool IsNull() const         { return (file == 0); }
    


    sipa commented at 5:39 AM on October 16, 2014:

    Can you use NULL instead?

  3. TheBlueMatt commented at 5:51 AM on October 16, 2014: contributor

    utACK

  4. laanwj commented at 6:39 AM on October 16, 2014: member

    utACK Edit: taking away my ACK for now, this will work but it doesn't cover all uses of !CAutoFile()

  5. Add IsNull() to class CAutoFile and remove operator ! 8769d9e82c
  6. rdponticelli force-pushed on Oct 16, 2014
  7. laanwj cross-referenced this on Oct 20, 2014 from issue CAutoFile: Explicit Get(), IsNull() and remove unused methods by laanwj
  8. laanwj commented at 10:57 AM on October 20, 2014: member

    See #5108

  9. rdponticelli closed this on Oct 20, 2014

  10. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC