Changeset 298


Ignore:
Timestamp:
01/17/15 02:42:28 (9 years ago)
Author:
Maciej Komosinski
Message:

0 -> NULL or false

Location:
cpp/frams/virtfile
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/virtfile/stdiofile.cpp

    r295 r298  
    2222#endif
    2323        //printFM("%p",f);
    24         if (f) return new StdioFILE(f, path); else return 0;
     24        if (f) return new StdioFILE(f, path); else return NULL;
    2525}
    2626
     
    3434#endif
    3535        //printFM("%p",d);
    36         if (d) return new StdioDIR(d); else return 0;
     36        if (d) return new StdioDIR(d); else return NULL;
    3737}
    3838
  • cpp/frams/virtfile/virtfile.cpp

    r295 r298  
    66#include <common/stl-util.h>
    77
    8 VirtFILE *VirtFILE::Vstdin=0;
    9 VirtFILE *VirtFILE::Vstdout=0;
    10 VirtFILE *VirtFILE::Vstderr=0;
     8VirtFILE *VirtFILE::Vstdin = NULL;
     9VirtFILE *VirtFILE::Vstdout = NULL;
     10VirtFILE *VirtFILE::Vstderr = NULL;
    1111
    12 VirtFileSystem *VirtFILE::vfs=0;
     12VirtFileSystem *VirtFILE::vfs = NULL;
    1313
    1414VirtFILE *Vfopen(const char* path,const char*mode)
    1515{
    16 return VirtFILE::vfs ? VirtFILE::vfs->Vfopen(path,mode) : 0;
     16return VirtFILE::vfs ? VirtFILE::vfs->Vfopen(path,mode) : NULL;
    1717}
    1818
    1919VirtDIR *Vopendir(const char* path)
    2020{
    21 return VirtFILE::vfs ? VirtFILE::vfs->Vopendir(path) : 0;
     21return VirtFILE::vfs ? VirtFILE::vfs->Vopendir(path) : NULL;
    2222}
    2323
     
    7979//////////////////////////////////////////////////////////////////////////
    8080
    81 VirtFILE* VirtFileSystem::Vfopen(const char* path,const char*mode) {return 0;}
    82 bool VirtFileSystem::Vfexists(const char* path) {return 0;}
    83 VirtDIR* VirtFileSystem::Vopendir(const char* path) {return 0;}
    84 bool VirtFileSystem::Vmkdir(const char* path) {return false;} //error - not supported
     81// base class only returns NULL/false/not supported - implementations perform the actual work
     82VirtFILE* VirtFileSystem::Vfopen(const char* path,const char*mode) {return NULL;}
     83bool VirtFileSystem::Vfexists(const char* path) {return false;}
     84VirtDIR* VirtFileSystem::Vopendir(const char* path) {return NULL;}
     85bool VirtFileSystem::Vmkdir(const char* path) {return false;}
    8586bool VirtFileSystem::Vdirexists(const char* path,bool is_writable) {return false;}
    8687
Note: See TracChangeset for help on using the changeset viewer.