summaryrefslogtreecommitdiff
path: root/src/array_data.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-31 22:44:28 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-02 00:12:56 +0100
commit9e613ae8a3cd7994194d2d709f6ff9b88feac70b (patch)
tree40611aafec40f836ca23ef9b99093d526f9d43c1 /src/array_data.cc
parentda15bff6e278d351301c9c50a4c96737ae4b5545 (diff)
Add Data class and change API to a raw pointer.
Diffstat (limited to 'src/array_data.cc')
-rw-r--r--src/array_data.cc28
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);
-}