diff options
Diffstat (limited to 'src/common/linear_disk_cache.h')
| -rw-r--r-- | src/common/linear_disk_cache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/linear_disk_cache.h b/src/common/linear_disk_cache.h index 96dce3155..f4263f72a 100644 --- a/src/common/linear_disk_cache.h +++ b/src/common/linear_disk_cache.h | |||
| @@ -64,7 +64,7 @@ public: | |||
| 64 | m_file.seekg(0, std::ios::beg); | 64 | m_file.seekg(0, std::ios::beg); |
| 65 | std::fstream::pos_type start_pos = m_file.tellg(); | 65 | std::fstream::pos_type start_pos = m_file.tellg(); |
| 66 | std::streamoff file_size = end_pos - start_pos; | 66 | std::streamoff file_size = end_pos - start_pos; |
| 67 | 67 | ||
| 68 | if (m_file.is_open() && ValidateHeader()) | 68 | if (m_file.is_open() && ValidateHeader()) |
| 69 | { | 69 | { |
| 70 | // good header, read some key/value pairs | 70 | // good header, read some key/value pairs |
| @@ -87,7 +87,7 @@ public: | |||
| 87 | 87 | ||
| 88 | // read key/value and pass to reader | 88 | // read key/value and pass to reader |
| 89 | if (Read(&key) && | 89 | if (Read(&key) && |
| 90 | Read(value, value_size) && | 90 | Read(value, value_size) && |
| 91 | Read(&entry_number) && | 91 | Read(&entry_number) && |
| 92 | entry_number == m_num_entries+1) | 92 | entry_number == m_num_entries+1) |
| 93 | { | 93 | { |
| @@ -115,7 +115,7 @@ public: | |||
| 115 | WriteHeader(); | 115 | WriteHeader(); |
| 116 | return 0; | 116 | return 0; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | void Sync() | 119 | void Sync() |
| 120 | { | 120 | { |
| 121 | m_file.flush(); | 121 | m_file.flush(); |