diff options
Diffstat (limited to 'src/array_data.cc')
| -rw-r--r-- | src/array_data.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/array_data.cc b/src/array_data.cc index 9d8473b8..a6f73868 100644 --- a/src/array_data.cc +++ b/src/array_data.cc @@ -85,31 +85,3 @@ ArrayData::ArrayData (boost::filesystem::path file) fclose (f); } - -void -ArrayData::write (boost::filesystem::path file) const -{ - FILE* f = fopen_boost (file, "wb"); - if (!f) { - throw FileError ("could not write to file", file, errno); - } - size_t const r = fwrite (_data.get(), 1, _size, f); - if (r != size_t (_size)) { - fclose (f); - throw FileError ("could not write to file", file, errno); - } - fclose (f); -} - -void -ArrayData::write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const -{ - write (temp); - boost::filesystem::rename (temp, final); -} - -bool -dcp::operator== (ArrayData const & a, ArrayData const & b) -{ - return (a.size() == b.size() && memcmp (a.data().get(), b.data().get(), a.size()) == 0); -} |
