Changeset 891 for cpp


Ignore:
Timestamp:
07/22/19 17:11:36 (5 years ago)
Author:
Maciej Komosinski
Message:

Fixed return integer type discrepancy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/virtfile/virtfile.h

    r655 r891  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    109109        bool Vfexists(const char* path);
    110110        VirtDIR *Vopendir(const char* path);
    111         virtual VirtDIR *internalopendir(const char* path) {return NULL;}
     111        virtual VirtDIR *internalopendir(const char* path) { return NULL; }
    112112        bool Vmkdir(const char* path);
    113113        bool Vmkdirs(const char* path);
    114114        bool Vdirexists(const char* path, bool is_writable);
    115115
    116         class Dir: public VirtDIR
     116        class Dir : public VirtDIR
    117117        {
    118         ChainFileSystem *first;
    119         VirtFileSystem *second;
    120         string path;
    121         std::set<string> duplicates;
    122         VirtDIR *dir;
    123           public:
    124         Dir(string _path,ChainFileSystem *_first,VirtFileSystem *_second):first(_first),second(_second),path(_path),dir(NULL) {}
    125         ~Dir();
    126         dirent* Vreaddir();
     118                ChainFileSystem *first;
     119                VirtFileSystem *second;
     120                string path;
     121                std::set<string> duplicates;
     122                VirtDIR *dir;
     123        public:
     124                Dir(string _path, ChainFileSystem *_first, VirtFileSystem *_second) :first(_first), second(_second), path(_path), dir(NULL) {}
     125                ~Dir();
     126                dirent* Vreaddir();
    127127        };
    128128};
     
    139139//required for redefine_stdio.h and for building virtfile.dll, can also be used if someone prefers the standard f-functions instead of explicitly using virtfile objects
    140140
    141 DLLEXP int fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f);
    142 DLLEXP int fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f);
     141DLLEXP size_t fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f);
     142DLLEXP size_t fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f);
    143143
    144144//since we want our own feof(VirtFILE*) function and some systems unfortunately define feof as a macro, we need to #undef it. Same as in virtfile.cpp
Note: See TracChangeset for help on using the changeset viewer.