From 586daae7fd1f08b8215955d2b638c5e13f1d7e84 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 24 Oct 2018 11:27:41 -0400 Subject: [PATCH] src: add direct dependency on `*-inl.h` file PR-URL: https://github.com/nodejs/node/pull/23808 Reviewed-By: Joyee Cheung Reviewed-By: Matheus Marchini --- src/inspector/main_thread_interface.cc | 1 + src/util-inl.h | 4 ++-- src/util.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index d3f553caac8..bb637d3a77f 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -5,6 +5,7 @@ #include #include +#include "util-inl.h" namespace node { namespace inspector { diff --git a/src/util-inl.h b/src/util-inl.h index e945c614d49..0edf77496e9 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -160,8 +160,8 @@ ContainerOfHelper::operator TypeName*() const { } template -inline ContainerOfHelper ContainerOf(Inner Outer::*field, - Inner* pointer) { +constexpr ContainerOfHelper ContainerOf(Inner Outer::*field, + Inner* pointer) { return ContainerOfHelper(field, pointer); } diff --git a/src/util.h b/src/util.h index 880408df4d5..68b8fe144bb 100644 --- a/src/util.h +++ b/src/util.h @@ -198,8 +198,8 @@ class ContainerOfHelper { // Calculate the address of the outer (i.e. embedding) struct from // the interior pointer to a data member. template -inline ContainerOfHelper ContainerOf(Inner Outer::*field, - Inner* pointer); +constexpr ContainerOfHelper ContainerOf(Inner Outer::*field, + Inner* pointer); // If persistent.IsWeak() == false, then do not call persistent.Reset() // while the returned Local is still in scope, it will destroy the