From c0020142da6f5f012b4ae93017634e78abaadc9d Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Thu, 10 Aug 2017 12:24:59 +0200
Subject: [PATCH] net/StaticSocketAddress: add method SetMaxSize()

---
 src/net/StaticSocketAddress.hxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/net/StaticSocketAddress.hxx b/src/net/StaticSocketAddress.hxx
index b3702ec4d..72287a8d1 100644
--- a/src/net/StaticSocketAddress.hxx
+++ b/src/net/StaticSocketAddress.hxx
@@ -79,6 +79,13 @@ public:
 		size = _size;
 	}
 
+	/**
+	 * Set the size to the maximum value for this class.
+	 */
+	void SetMaxSize() {
+		SetSize(GetCapacity());
+	}
+
 	int GetFamily() const noexcept {
 		return address.ss_family;
 	}