From c6dbca7c4b8f73be750c08f33d52f04c414cb39e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 17 Apr 2021 21:09:56 +0200 Subject: [PATCH] Add FlagStorage.get --- .../src/de/steamwar/bausystem/region/FlagStorage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java index 46fc70ba..8efdb4eb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/FlagStorage.java @@ -41,8 +41,9 @@ public class FlagStorage { return flags.put(flagType, value) != value; } - public Flag.Value get(final Flag flagType) { - return flags.get(flagType); + @SuppressWarnings("unchecked") + public & Flag.Value> Flag.Value get(final Flag flagType) { + return (Flag.Value) flags.get(flagType); } private void readKeys() {