From c98f7d304bdffd4065c70f75f06306fb7f432adb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 15 Sep 2020 21:21:16 +0200 Subject: [PATCH] - added a list compare function to FScanner. --- source/common/engine/sc_man.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/common/engine/sc_man.h b/source/common/engine/sc_man.h index 4022964ee..6c37806a8 100644 --- a/source/common/engine/sc_man.h +++ b/source/common/engine/sc_man.h @@ -131,6 +131,11 @@ public: void UnGet(); bool Compare(const char *text); + inline bool Compare(const std::initializer_list& list) + { + for (auto c : list) if (Compare(c)) return true; + return false; + } int MatchString(const char * const *strings, size_t stride = sizeof(char*)); int MustMatchString(const char * const *strings, size_t stride = sizeof(char*)); int GetMessageLine();