diff options
author | Max Kellermann <max@musicpd.org> | 2017-09-13 10:32:55 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-09-13 10:32:55 +0200 |
commit | 101f08ca751caa2d53a7c57e0ca95f8a8140b17b (patch) | |
tree | 6cc0172cd34ff0156dc121a26e6fe57d6314b8ec | |
parent | 3b7f9827abbf3a40eaf36f9e9fe76ad98fa4e474 (diff) |
util/Cast: make the "member" pointer const
-rw-r--r-- | src/util/Cast.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/Cast.hxx b/src/util/Cast.hxx index 7e0eec2c6..b530878e0 100644 --- a/src/util/Cast.hxx +++ b/src/util/Cast.hxx @@ -85,7 +85,7 @@ ContainerAttributeOffset(const A C::*p) */ template<class C, class A> static inline constexpr C & -ContainerCast(A &a, A C::*member) +ContainerCast(A &a, const A C::*member) { return *OffsetCast<C, A>(&a, ContainerAttributeOffset<C, A>(member)); } @@ -95,7 +95,7 @@ ContainerCast(A &a, A C::*member) */ template<class C, class A> static inline constexpr const C & -ContainerCast(const A &a, A C::*member) +ContainerCast(const A &a, const A C::*member) { return *OffsetCast<const C, const A>(&a, ContainerAttributeOffset<C, A>(member)); } |