Changeset 888 for cpp/common/virtfile
- Timestamp:
- 07/22/19 01:15:38 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/virtfile/virtfile.cpp
r841 r888 64 64 { 65 65 string s = ssprintf_va(format, args); 66 return Vwrite(s.c_str(), 1, s.size());66 return (int)Vwrite(s.c_str(), 1, s.size()); 67 67 } 68 68 … … 78 78 int VirtFILE::getSize() 79 79 { 80 intsaved_pos = Vtell();80 auto saved_pos = Vtell(); 81 81 Vseek(0, SEEK_END); 82 int size = Vtell();82 int size = (int)Vtell(); 83 83 Vseek(saved_pos, SEEK_SET); 84 84 return size; … … 104 104 105 105 106 int fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vread(ptr, size, nmemb); }107 int fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vwrite(ptr, size, nmemb); }106 size_t fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vread(ptr, size, nmemb); } 107 size_t fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vwrite(ptr, size, nmemb); } 108 108 109 109 … … 132 132 int fgetc(VirtFILE* f) { return f->Vgetc(); } 133 133 int fseek(VirtFILE* f, long offset, int whence) { return f->Vseek(offset, whence); } 134 int ftell(VirtFILE* f) { return f->Vtell(); }134 int ftell(VirtFILE* f) { return (int)f->Vtell(); } 135 135 void rewind(VirtFILE* f) { f->Vrewind(); } 136 136 int fflush(VirtFILE* f) { return f->Vflush(); }
Note: See TracChangeset
for help on using the changeset viewer.