Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / data.cc
index e117199a1c9b3cfcbc736248edf36f274eececf1..eb3ec4c634c1fc2104fe4a1f6301550369c56cc2 100644 (file)
 #include "data.h"
 #include "cross.h"
 #include "exceptions.h"
+#include <cstdio>
 
 #include "i18n.h"
 
 using boost::shared_array;
 
+Data::Data ()
+       : _size (0)
+{
+
+}
+
 Data::Data (int size)
        : _data (new uint8_t[size])
        , _size (size)
@@ -48,13 +55,13 @@ Data::Data (boost::filesystem::path file)
        if (!f) {
                throw FileError (_("could not open file for reading"), file);
        }
-       
+
        size_t const r = fread (_data.get(), 1, _size, f);
        if (r != size_t (_size)) {
                fclose (f);
                throw FileError (_("could not read from file"), file);
        }
-               
+
        fclose (f);
 }