Small fixes and tidy-ups spotted by cppcheck.
[dcpomatic.git] / src / lib / exceptions.h
index 950c2f381aae0da529fc0403c75fbfa3412637a6..96dc816ec4dea27cbbc94937dbf98a0c76c2fe6b 100644 (file)
@@ -40,9 +40,9 @@ class StringError : public std::exception
 {
 public:
        /** @param w Error message */
-       StringError (std::string w) {
-               _what = w;
-       }
+       StringError (std::string w)
+               : _what (w)
+       {}
 
        virtual ~StringError () throw () {}