summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-23 15:34:47 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-23 15:34:47 +0100
commit02ff5c5989c4e2a84e4a3be8123abdbd887f8648 (patch)
tree4cb8b458691329cba95e8e282aa01803ccef3848
parent04156a67a01fbb81c6e8b59ecff6a22dee712c30 (diff)
A few small cleanups.
-rw-r--r--src/lut.h3
-rw-r--r--src/parse/subtitle.h11
-rw-r--r--src/rgb_xyz.cc2
-rw-r--r--src/util.cc2
4 files changed, 12 insertions, 6 deletions
diff --git a/src/lut.h b/src/lut.h
index 3efcaaed..ad291467 100644
--- a/src/lut.h
+++ b/src/lut.h
@@ -21,10 +21,11 @@
#define LIBDCP_LUT_H
#include <cmath>
+#include <boost/utility.hpp>
namespace libdcp {
-class LUT
+class LUT : boost::noncopyable
{
public:
LUT(int bit_depth, float gamma)
diff --git a/src/parse/subtitle.h b/src/parse/subtitle.h
index 34321545..c20278a3 100644
--- a/src/parse/subtitle.h
+++ b/src/parse/subtitle.h
@@ -32,7 +32,11 @@ class Font;
class Text
{
public:
- Text () {}
+ Text ()
+ : v_position (0)
+ , v_align (TOP)
+ {}
+
Text (boost::shared_ptr<const cxml::Node> node);
float v_position;
@@ -61,7 +65,10 @@ private:
class Font
{
public:
- Font () {}
+ Font ()
+ : size (0)
+ {}
+
Font (boost::shared_ptr<const cxml::Node> node);
Font (std::list<boost::shared_ptr<Font> > const & font_nodes);
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index 22b2bdec..071c800a 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -60,7 +60,7 @@ libdcp::xyz_to_rgb (shared_ptr<const XYZFrame> xyz_frame, shared_ptr<const LUT>
uint8_t* argb_line = argb;
for (int x = 0; x < xyz_frame->size().width; ++x) {
- assert (*xyz_x >= 0 && *xyz_y >= 0 && *xyz_z >= 0 && *xyz_x < 4096 && *xyz_x < 4096 && *xyz_z < 4096);
+ assert (*xyz_x >= 0 && *xyz_y >= 0 && *xyz_z >= 0 && *xyz_x < 4096 && *xyz_y < 4096 && *xyz_z < 4096);
/* In gamma LUT */
s.x = lut_in->lut()[*xyz_x++];
diff --git a/src/util.cc b/src/util.cc
index 848667fc..e0727d9a 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -84,7 +84,6 @@ libdcp::make_digest (string filename)
SHA1_Init (&sha);
Kumu::ByteString read_buffer (65536);
- int done = 0;
while (1) {
ui32_t read = 0;
Kumu::Result_t r = reader.Read (read_buffer.Data(), read_buffer.Capacity(), &read);
@@ -96,7 +95,6 @@ libdcp::make_digest (string filename)
}
SHA1_Update (&sha, read_buffer.Data(), read);
- done += read;
}
byte_t byte_buffer[20];