Translator: remove usage of contains()

It's not available pre-C++20

Bug: angleproject:8311
Change-Id: I41940b5f8e6a90bc0224852aefe54643f2be9cb5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4806924
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Shahbaz Youssefi
2023-08-23 11:06:42 -04:00
committed by Angle LUCI CQ
parent b0777def38
commit 711db27554

View File

@@ -78,10 +78,10 @@ class Rescoper : public TIntermTraverser
void visitSymbol(TIntermSymbol *node) override
{
const TVariable &var = node->variable();
if (mCurrentFunction && mGlobalVarsNeedRescope.contains(&var))
if (mCurrentFunction && mGlobalVarsNeedRescope.find(&var) != mGlobalVarsNeedRescope.end())
{
std::set<TIntermFunctionDefinition *> &set = mGlobalVarsNeedRescope.at(&var).functions;
if (!set.contains(mCurrentFunction))
if (set.find(mCurrentFunction) == set.end())
{
set.emplace(mCurrentFunction);
}