黄东文

Results 2 issues of 黄东文

const Buffer& Buffer::operator=(const Buffer& other) { Free(); ShallowCopy(other); return *this; } 你好,请问这个函数是否没有考虑 a=a这种自我赋值的情况呢

int ret = fread(data, size, 1, file_); if (size == 0 || ret == 0) return false; if (ret == -1) {} 上面是你的filesystem.cc的代码,这段代码有错误,fread不会返回-1,当返回0的时候应该用feof,ferror来检测是什么原因导致返回的数目比1少,发生错误到关闭 引用下面这段话: RETURN VALUE fread and fwrite return...