summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2018-10-24 11:27:41 -0400
committerRefael Ackermann <refack@gmail.com>2018-10-24 16:34:36 -0400
commit586daae7fd1f08b8215955d2b638c5e13f1d7e84 (patch)
treef4e606be7b3915f0b7a31a974fac5ccb101f93ed
parent4044b06c08314d3197fc2d8bd6177e7e870236e2 (diff)
downloadandroid-node-v8-586daae7fd1f08b8215955d2b638c5e13f1d7e84.tar.gz
android-node-v8-586daae7fd1f08b8215955d2b638c5e13f1d7e84.tar.bz2
android-node-v8-586daae7fd1f08b8215955d2b638c5e13f1d7e84.zip
src: add direct dependency on `*-inl.h` file
PR-URL: https://github.com/nodejs/node/pull/23808 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
-rw-r--r--src/inspector/main_thread_interface.cc1
-rw-r--r--src/util-inl.h4
-rw-r--r--src/util.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc
index d3f553caac..bb637d3a77 100644
--- a/src/inspector/main_thread_interface.cc
+++ b/src/inspector/main_thread_interface.cc
@@ -5,6 +5,7 @@
#include <functional>
#include <unicode/unistr.h>
+#include "util-inl.h"
namespace node {
namespace inspector {
diff --git a/src/util-inl.h b/src/util-inl.h
index e945c614d4..0edf77496e 100644
--- a/src/util-inl.h
+++ b/src/util-inl.h
@@ -160,8 +160,8 @@ ContainerOfHelper<Inner, Outer>::operator TypeName*() const {
}
template <typename Inner, typename Outer>
-inline ContainerOfHelper<Inner, Outer> ContainerOf(Inner Outer::*field,
- Inner* pointer) {
+constexpr ContainerOfHelper<Inner, Outer> ContainerOf(Inner Outer::*field,
+ Inner* pointer) {
return ContainerOfHelper<Inner, Outer>(field, pointer);
}
diff --git a/src/util.h b/src/util.h
index 880408df4d..68b8fe144b 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 <typename Inner, typename Outer>
-inline ContainerOfHelper<Inner, Outer> ContainerOf(Inner Outer::*field,
- Inner* pointer);
+constexpr ContainerOfHelper<Inner, Outer> ContainerOf(Inner Outer::*field,
+ Inner* pointer);
// If persistent.IsWeak() == false, then do not call persistent.Reset()
// while the returned Local<T> is still in scope, it will destroy the