Skip to content

Commit 1da02f2

Browse files
Added Const MaximumCharacterLength
1 parent d816bcc commit 1da02f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Assets/HoloToolkit/Sharing/Scripts/Utilities/ManualIpConfiguration.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ namespace HoloToolkit.Sharing.Utilities
1010
/// </summary>
1111
public class ManualIpConfiguration : MonoBehaviour
1212
{
13+
/// <summary>
14+
/// The maximum length of characters in a IPv4 address.
15+
/// </summary>
16+
private const int MaximumCharacterLength = 12;
17+
1318
public string IpAddress { get { return ipAddress.text; } }
1419

1520
/// <summary>
@@ -152,7 +157,7 @@ public void InputString(string input)
152157
ipAddress.text = string.Empty;
153158
}
154159

155-
if (ipAddress.text.Length < 15)
160+
if (ipAddress.text.Length < MaximumCharacterLength)
156161
{
157162
ipAddress.text += input;
158163
}

0 commit comments

Comments
 (0)