Changeset 887 for cpp/common/virtfile
- Timestamp:
- 07/22/19 01:14:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/virtfile/stringfile.h
r720 r887 18 18 StringFILE(string& s,int _pos=0): VirtFILE(""), str(s), pos(_pos) {} 19 19 size_t Vread(void *ptr, size_t size, size_t nmemb); 20 size_t Vwrite(const void *ptr, size_t size, size_t nmemb) { str.append((const char*)ptr, (int)(size*nmemb)); return size*nmemb; }20 size_t Vwrite(const void *ptr, size_t size, size_t nmemb) { str.append((const char*)ptr, (int)(size*nmemb)); return nmemb; } 21 21 int Veof() { return pos >= int(str.size()); } 22 22 int Vputc(int c) { str += (char)c; return c; }
Note: See TracChangeset
for help on using the changeset viewer.