Commit 68945f1c by Jamie Madill Committed by Commit Bot

Enable "-Wredundant-parens".

This one is also required by Skia. It's purely for consistency and code readability. Bug: angleproject:4046 Change-Id: I9ed418a0bf6c7661f0970fef6da7088ca6ae6204 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877478Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent a6206854
......@@ -141,6 +141,7 @@ config("extra_warnings") {
"-Wfloat-conversion",
"-Wmissing-field-initializers",
"-Wnon-virtual-dtor",
"-Wredundant-parens",
"-Wshadow-field",
"-Wtautological-type-limit-compare",
"-Wunneeded-internal-declaration",
......
......@@ -64,7 +64,7 @@ struct UnmangledBuiltIn
};
using VarPointer = TSymbol *(TSymbolTableBase::*);
using ValidateExtension = int(ShBuiltInResources::*);
using ValidateExtension = int ShBuiltInResources::*;
enum class Spec
{
......
......@@ -749,20 +749,20 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
const ExtensionInfoMap &GetExtensionInfoMap()
{
auto buildExtensionInfoMap = []() {
auto enableableExtension = [](ExtensionInfo::ExtensionBool member) {
auto enableableExtension = [](ExtensionBool member) {
ExtensionInfo info;
info.Requestable = true;
info.ExtensionsMember = member;
return info;
};
auto enableableDisablableExtension = [&](ExtensionInfo::ExtensionBool member) {
auto enableableDisablableExtension = [&](ExtensionBool member) {
ExtensionInfo info = enableableExtension(member);
info.Disablable = true;
return info;
};
auto esOnlyExtension = [](ExtensionInfo::ExtensionBool member) {
auto esOnlyExtension = [](ExtensionBool member) {
ExtensionInfo info;
info.ExtensionsMember = member;
return info;
......
......@@ -543,6 +543,9 @@ struct Extensions
bool baseVertexBaseInstance = false;
};
// Pointer to a boolean memeber of the Extensions struct
using ExtensionBool = bool Extensions::*;
struct ExtensionInfo
{
// If this extension can be enabled or disabled with glRequestExtension
......@@ -551,7 +554,6 @@ struct ExtensionInfo
bool Disablable = false;
// Pointer to a boolean member of the Extensions struct
typedef bool(Extensions::*ExtensionBool);
ExtensionBool ExtensionsMember = nullptr;
};
......
......@@ -83,9 +83,6 @@ static bool RequireES(const Version &clientVersion, const Extensions &)
return clientVersion >= Version(minCoreGLMajorVersion, minCoreGLMinorVersion);
}
// Pointer to a boolean memeber of the Extensions struct
typedef bool(Extensions::*ExtensionBool);
// Check support for a single extension
template <ExtensionBool bool1>
static bool RequireExt(const Version &, const Extensions &extensions)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment