| 129 | } |
| 130 | |
| 131 | int TFile::FWrite(const void* buffer, int size, int count) { |
| 132 | ASSERT_HOST(is_writing_); |
| 133 | int total = size * count; |
| 134 | if (total <= 0) return 0; |
| 135 | const char* buf = reinterpret_cast<const char*>(buffer); |
| 136 | // This isn't very efficient, but memory is so fast compared to disk |
| 137 | // that it is relatively unimportant, and very simple. |
| 138 | for (int i = 0; i < total; ++i) |
| 139 | data_->push_back(buf[i]); |
| 140 | return count; |
| 141 | } |
| 142 | |
| 143 | |
| 144 | } // namespace tesseract. |
no test coverage detected