aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/StaticSocketAddress.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-07-22 10:55:35 +0200
committerMax Kellermann <max@duempel.org>2015-07-22 10:55:57 +0200
commit7de0a621e3a33b25a62d875670380d33dbd977f5 (patch)
tree229db794983b0ae959b53fb434877c6ca9a9d815 /src/net/StaticSocketAddress.hxx
parent3441ea9844a9f91c8d2476be546133610763b4fe (diff)
downloadmpd-7de0a621e3a33b25a62d875670380d33dbd977f5.tar.gz
mpd-7de0a621e3a33b25a62d875670380d33dbd977f5.tar.xz
mpd-7de0a621e3a33b25a62d875670380d33dbd977f5.zip
net/StaticSocketAddress: replace cast operator with GetAddress()
The implicit cast operator can be very dangerous.
Diffstat (limited to '')
-rw-r--r--src/net/StaticSocketAddress.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/StaticSocketAddress.hxx b/src/net/StaticSocketAddress.hxx
index 2d92d36b5..0a780f6f6 100644
--- a/src/net/StaticSocketAddress.hxx
+++ b/src/net/StaticSocketAddress.hxx
@@ -56,11 +56,11 @@ public:
size);
}
- operator struct sockaddr *() {
+ struct sockaddr *GetAddress() {
return reinterpret_cast<struct sockaddr *>(&address);
}
- operator const struct sockaddr *() const {
+ const struct sockaddr *GetAddress() const {
return reinterpret_cast<const struct sockaddr *>(&address);
}