From 9237ef868ecdc86155c2441779ca07fb8176ec23 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 10 Aug 2017 12:32:12 +0200 Subject: [PATCH] src: avoid creating local data variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the following comment and attempts to fix the issue as the the requirement of g++ version is now 4.9.4 or newer: // XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug // when the expression is written as info.Data().As(). PR-URL: https://github.com/nodejs/node/pull/14732 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- src/env-inl.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/env-inl.h b/src/env-inl.h index 561c76257e09bc..f7d9ff626f598a 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -283,10 +283,8 @@ template inline Environment* Environment::GetCurrent( const v8::PropertyCallbackInfo& info) { CHECK(info.Data()->IsExternal()); - // XXX(bnoordhuis) Work around a g++ 4.9.2 template type inferrer bug - // when the expression is written as info.Data().As(). - v8::Local data = info.Data(); - return static_cast(data.As()->Value()); + return static_cast( + info.Data().template As()->Value()); } inline Environment::Environment(IsolateData* isolate_data,