projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20b6a98
)
Cleanup: make some default constructors more consistent.
v1.8.75
author
Carl Hetherington
<cth@carlh.net>
Tue, 8 Aug 2023 16:21:24 +0000
(18:21 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 8 Aug 2023 16:21:31 +0000
(18:21 +0200)
src/types.cc
patch
|
blob
|
history
src/types.h
patch
|
blob
|
history
diff --git
a/src/types.cc
b/src/types.cc
index 9b86819797c6fefe955a4fb30f88ae102c58dbb7..e2e72ad1ab5bdbfedc409d679adbbbaf60512d13 100644
(file)
--- a/
src/types.cc
+++ b/
src/types.cc
@@
-109,12
+109,6
@@
dcp::operator!= (Fraction const & a, Fraction const & b)
}
}
-Colour::Colour ()
-{
-
-}
-
-
Colour::Colour (int r_, int g_, int b_)
: r (r_)
, g (g_)
Colour::Colour (int r_, int g_, int b_)
: r (r_)
, g (g_)
diff --git
a/src/types.h
b/src/types.h
index 340d86133524cae4896ee853ebf135405d5e60be..f6e996c7dfa96d8906046229b4b80bf7e6ee50e6 100644
(file)
--- a/
src/types.h
+++ b/
src/types.h
@@
-69,10
+69,7
@@
namespace dcp
*/
struct Size
{
*/
struct Size
{
- Size ()
- : width (0)
- , height (0)
- {}
+ Size() = default;
Size (int w, int h)
: width (w)
Size (int w, int h)
: width (w)
@@
-83,8
+80,8
@@
struct Size
return float (width) / height;
}
return float (width) / height;
}
- int width;
- int height;
+ int width
= 0
;
+ int height
= 0
;
};
};
@@
-206,7
+203,8
@@
class Fraction
{
public:
/** Construct a fraction of 0/0 */
{
public:
/** Construct a fraction of 0/0 */
- Fraction () {}
+ Fraction() = default;
+
explicit Fraction (std::string s);
/** Construct a fraction with a specified numerator and denominator.
* @param n Numerator.
explicit Fraction (std::string s);
/** Construct a fraction with a specified numerator and denominator.
* @param n Numerator.
@@
-261,7
+259,7
@@
class Colour
{
public:
/** Construct a Colour, initialising it to black */
{
public:
/** Construct a Colour, initialising it to black */
- Colour
()
;
+ Colour
() = default
;
/** Construct a Colour from R, G and B. The values run between
* 0 and 255.
/** Construct a Colour from R, G and B. The values run between
* 0 and 255.