From ef7a5ba6e9ddb58e534f562a953ac497c7e2b83b Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 04:16:48 -0600 Subject: [PATCH 01/10] Add standard variable + use c++14 --- binding.gyp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binding.gyp b/binding.gyp index 249e9e82..c096277b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -67,7 +67,8 @@ ], "variables": { - "tests": 0 + "tests": 0, + "STANDARD": 14, }, "conditions": [ @@ -111,9 +112,8 @@ }] }] ], - "target_defaults": { - "cflags_cc": ["-std=c++11"], + "cflags_cc": [ "-std=c++<(STANDARD)" ], "conditions": [ ['OS=="mac"', { "xcode_settings": { From a8296f11198ef0685ed887e4850d46ca7c4abb81 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 04:17:10 -0600 Subject: [PATCH 02/10] Add MACOSX_DEPLOYMENT_TARGET variable --- binding.gyp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index c096277b..7134ff69 100644 --- a/binding.gyp +++ b/binding.gyp @@ -69,6 +69,7 @@ "variables": { "tests": 0, "STANDARD": 14, + "MACOSX_DEPLOYMENT_TARGET": "10.8" }, "conditions": [ @@ -101,11 +102,11 @@ "conditions": [ ['OS=="mac"', { 'cflags': [ - '-mmacosx-version-min=10.8' + "-mmacosx-version-min=<(MACOSX_DEPLOYMENT_TARGET)" ], "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES", - 'MACOSX_DEPLOYMENT_TARGET': '10.8', + 'MACOSX_DEPLOYMENT_TARGET': '<(MACOSX_DEPLOYMENT_TARGET)', } }] ] From d3f3d4038d89f9168a0cbfc8fabdf52703127742 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 04:19:48 -0600 Subject: [PATCH 03/10] Add Release configurations and optimizations --- binding.gyp | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index 7134ff69..d2463875 100644 --- a/binding.gyp +++ b/binding.gyp @@ -130,6 +130,40 @@ "NOMINMAX" ], }] - ] - } + ], + 'default_configuration': 'Release', + 'configurations': { + # Release Settings + 'Release': { + 'defines': [ 'NDEBUG' ], + "cflags": [ "-fno-exceptions", "-Ofast" ], + "cflags_cc": [ "-fno-exceptions", "-Ofast", "-std=c++<(STANDARD)" ], + "xcode_settings": { + 'GCC_OPTIMIZATION_LEVEL': '3', # stop gyp from defaulting to -Os + "CLANG_CXX_LIBRARY": "libc++", + "CLANG_CXX_LANGUAGE_STANDARD": "c++<(STANDARD)", + 'MACOSX_DEPLOYMENT_TARGET': "<(MACOSX_DEPLOYMENT_TARGET)" + }, # XCODE + "msvs_settings": { + "VCCLCompilerTool": { + 'ExceptionHandling': 0, # /EHsc + 'MultiProcessorCompilation': 'true', + 'RuntimeTypeInfo': 'false', + 'Optimization': 3, # full optimizations /O2 == /Og /Oi /Ot /Oy /Ob2 /GF /Gy + 'StringPooling': 'true', # pool string literals + "AdditionalOptions": [ + # C++ standard + "/std:c++<(STANDARD)", + + # Optimizations + "/O2", + # "/Ob3", # aggressive inline + "/GL", # whole Program Optimization # /LTCG is implied with /GL. + "/DNDEBUG" # turn off asserts + ], + } + } # MSVC + }, # Release + }, # configurations + } # target-defaults } From 490e7856f05834e2bcd84bf45ff7b861776c20d6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 04:29:56 -0600 Subject: [PATCH 04/10] Use C++17 standard --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index d2463875..85981bbb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -68,7 +68,7 @@ "variables": { "tests": 0, - "STANDARD": 14, + "STANDARD": 17, "MACOSX_DEPLOYMENT_TARGET": "10.8" }, From 18aac6514b8897636da3576d97594cb01e26afed Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 04:40:36 -0600 Subject: [PATCH 05/10] Use Visual Studio 17 on AppVeyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index aa43e41e..132e2c69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -image: Visual Studio 2015 +image: Visual Studio 2017 environment: matrix: From efe74c61ea279d9b2628f74a7cc978e910c7953a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 4 Dec 2020 13:51:00 -0600 Subject: [PATCH 06/10] Use Clang 9 on Travis --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1831c829..5e046229 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "12.14.1" before_install: - - export CXX="g++-4.9" CC="gcc-4.9" + - export CXX="clang-9.0" CC="clang++-9.0" script: - npm run standard @@ -31,5 +31,5 @@ addons: sources: - ubuntu-toolchain-r-test packages: - - gcc-4.9 - - g++-4.9 + - clang-9.0 + - clang++-9.0 From 896816273ca1f349c1d313ae093ffe27df8c926e Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 05:12:05 -0600 Subject: [PATCH 07/10] use native optional --- src/core/optional.h | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/core/optional.h b/src/core/optional.h index 61280d99..33852e05 100644 --- a/src/core/optional.h +++ b/src/core/optional.h @@ -1,29 +1,7 @@ #ifndef SUPERSTRING_OPTIONAL_H #define SUPERSTRING_OPTIONAL_H -#include +#include +using std::optional; -template class optional { - T value; - bool is_some; - -public: - optional(T &&value) : value(std::move(value)), is_some(true) {} - optional(const T &value) : value(value), is_some(true) {} - optional() : value(T()), is_some(false) {} - - T &operator*() { return value; } - const T &operator*() const { return value; } - const T *operator->() const { return &value; } - T *operator->() { return &value; } - operator bool() const { return is_some; } - bool operator==(const optional &other) { - if (is_some) { - return other.is_some && value == other.value; - } else { - return !other.is_some; - } - } -}; - -#endif // SUPERSTRING_OPTIONAL_H +#endif // SUPERSTRING_OPTIONAL_H From b0702ea0532f203d4b39b28e5802283ebbb547d8 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 06:02:35 -0600 Subject: [PATCH 08/10] remove optional.h and include optional directly --- src/bindings/em/auto-wrap.h | 3 ++- src/bindings/marker-index-wrapper.cc | 3 ++- src/bindings/marker-index-wrapper.h | 3 ++- src/bindings/number-conversion.h | 3 ++- src/bindings/point-wrapper.h | 3 ++- src/bindings/range-wrapper.h | 3 ++- src/bindings/string-conversion.h | 3 ++- src/core/encoding-conversion.h | 3 ++- src/core/optional.h | 7 ------- src/core/patch.cc | 3 ++- src/core/patch.h | 3 ++- src/core/regex.h | 3 ++- src/core/text.h | 3 ++- 13 files changed, 24 insertions(+), 19 deletions(-) delete mode 100644 src/core/optional.h diff --git a/src/bindings/em/auto-wrap.h b/src/bindings/em/auto-wrap.h index ff4ff070..7fd3f938 100644 --- a/src/bindings/em/auto-wrap.h +++ b/src/bindings/em/auto-wrap.h @@ -7,7 +7,8 @@ #include #include "flat_set.h" #include "marker-index.h" -#include "optional.h" +#include +using std::optional; #include "point.h" #include "text.h" diff --git a/src/bindings/marker-index-wrapper.cc b/src/bindings/marker-index-wrapper.cc index f53853e3..138e096d 100644 --- a/src/bindings/marker-index-wrapper.cc +++ b/src/bindings/marker-index-wrapper.cc @@ -3,7 +3,8 @@ #include "marker-index.h" #include "nan.h" #include "noop.h" -#include "optional.h" +#include +using std::optional; #include "point-wrapper.h" #include "range.h" diff --git a/src/bindings/marker-index-wrapper.h b/src/bindings/marker-index-wrapper.h index 2f64cc54..f6eaba13 100644 --- a/src/bindings/marker-index-wrapper.h +++ b/src/bindings/marker-index-wrapper.h @@ -1,6 +1,7 @@ #include "nan.h" #include "marker-index.h" -#include "optional.h" +#include +using std::optional; #include "range.h" class MarkerIndexWrapper : public Nan::ObjectWrap { diff --git a/src/bindings/number-conversion.h b/src/bindings/number-conversion.h index cc063be9..3a3f0fc1 100644 --- a/src/bindings/number-conversion.h +++ b/src/bindings/number-conversion.h @@ -2,7 +2,8 @@ #define SUPERSTRING_NUMBER_CONVERSION_H #include "nan.h" -#include "optional.h" +#include +using std::optional; namespace number_conversion { template diff --git a/src/bindings/point-wrapper.h b/src/bindings/point-wrapper.h index fc06b263..52e500fc 100644 --- a/src/bindings/point-wrapper.h +++ b/src/bindings/point-wrapper.h @@ -2,7 +2,8 @@ #define SUPERSTRING_POINT_WRAPPER_H #include "nan.h" -#include "optional.h" +#include +using std::optional; #include "point.h" class PointWrapper : public Nan::ObjectWrap { diff --git a/src/bindings/range-wrapper.h b/src/bindings/range-wrapper.h index de08dd59..9df83e6f 100644 --- a/src/bindings/range-wrapper.h +++ b/src/bindings/range-wrapper.h @@ -2,7 +2,8 @@ #define SUPERSTRING_RANGE_WRAPPER_H #include "nan.h" -#include "optional.h" +#include +using std::optional; #include "point.h" #include "range.h" diff --git a/src/bindings/string-conversion.h b/src/bindings/string-conversion.h index f8178041..61ebfc64 100644 --- a/src/bindings/string-conversion.h +++ b/src/bindings/string-conversion.h @@ -3,7 +3,8 @@ #include #include "nan.h" -#include "optional.h" +#include +using std::optional; #include "text.h" namespace string_conversion { diff --git a/src/core/encoding-conversion.h b/src/core/encoding-conversion.h index 3b91146a..f24303d5 100644 --- a/src/core/encoding-conversion.h +++ b/src/core/encoding-conversion.h @@ -1,7 +1,8 @@ #ifndef SUPERSTRING_ENCODING_CONVERSION_H_ #define SUPERSTRING_ENCODING_CONVERSION_H_ -#include "optional.h" +#include +using std::optional; #include "text.h" #include diff --git a/src/core/optional.h b/src/core/optional.h deleted file mode 100644 index 33852e05..00000000 --- a/src/core/optional.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef SUPERSTRING_OPTIONAL_H -#define SUPERSTRING_OPTIONAL_H - -#include -using std::optional; - -#endif // SUPERSTRING_OPTIONAL_H diff --git a/src/core/patch.cc b/src/core/patch.cc index 8702f9b3..550f91db 100644 --- a/src/core/patch.cc +++ b/src/core/patch.cc @@ -1,5 +1,6 @@ #include "patch.h" -#include "optional.h" +#include +using std::optional; #include "text.h" #include "text-slice.h" #include diff --git a/src/core/patch.h b/src/core/patch.h index c59021e5..4ddf8aad 100644 --- a/src/core/patch.h +++ b/src/core/patch.h @@ -1,7 +1,8 @@ #ifndef PATCH_H_ #define PATCH_H_ -#include "optional.h" +#include +using std::optional; #include "point.h" #include "serializer.h" #include "text.h" diff --git a/src/core/regex.h b/src/core/regex.h index 10970306..cd8de961 100644 --- a/src/core/regex.h +++ b/src/core/regex.h @@ -1,7 +1,8 @@ #ifndef REGEX_H_ #define REGEX_H_ -#include "optional.h" +#include +using std::optional; #include struct pcre2_real_code_16; diff --git a/src/core/text.h b/src/core/text.h index 0326a902..4f0f9bb5 100644 --- a/src/core/text.h +++ b/src/core/text.h @@ -7,7 +7,8 @@ #include #include "serializer.h" #include "point.h" -#include "optional.h" +#include +using std::optional; class TextSlice; From 864b9cd56adf222751cddfa6d0e811846ecb7e52 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 06:12:03 -0600 Subject: [PATCH 09/10] modernize-deprecated-headers This replaces the deprecated c headers with their versions --- src/bindings/text-buffer-wrapper.cc | 2 +- src/core/encoding-conversion.cc | 2 +- src/core/encoding-conversion.h | 2 +- src/core/libmba-diff.cc | 6 +++--- src/core/libmba-diff.h | 2 +- src/core/marker-index.cc | 2 +- src/core/patch.cc | 4 ++-- src/core/regex.cc | 2 +- src/core/text-diff.cc | 2 +- src/core/text-slice.cc | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bindings/text-buffer-wrapper.cc b/src/bindings/text-buffer-wrapper.cc index 52e7bded..568cc632 100644 --- a/src/bindings/text-buffer-wrapper.cc +++ b/src/bindings/text-buffer-wrapper.cc @@ -1,7 +1,7 @@ #include "text-buffer-wrapper.h" #include #include -#include +#include #include "number-conversion.h" #include "point-wrapper.h" #include "range-wrapper.h" diff --git a/src/core/encoding-conversion.cc b/src/core/encoding-conversion.cc index 7259d40d..424eaaac 100644 --- a/src/core/encoding-conversion.cc +++ b/src/core/encoding-conversion.cc @@ -1,7 +1,7 @@ #include "encoding-conversion.h" #include "utf8-conversions.h" #include -#include +#include using std::function; using std::u16string; diff --git a/src/core/encoding-conversion.h b/src/core/encoding-conversion.h index f24303d5..fe667c3d 100644 --- a/src/core/encoding-conversion.h +++ b/src/core/encoding-conversion.h @@ -4,7 +4,7 @@ #include using std::optional; #include "text.h" -#include +#include class EncodingConversion { void *data; diff --git a/src/core/libmba-diff.cc b/src/core/libmba-diff.cc index 418d51a9..7cf09a4d 100644 --- a/src/core/libmba-diff.cc +++ b/src/core/libmba-diff.cc @@ -52,9 +52,9 @@ */ #include "libmba-diff.h" -#include -#include -#include +#include +#include +#include #include using std::vector; diff --git a/src/core/libmba-diff.h b/src/core/libmba-diff.h index 04237974..72e42c0b 100644 --- a/src/core/libmba-diff.h +++ b/src/core/libmba-diff.h @@ -1,7 +1,7 @@ #ifndef MBA_DIFF_H_ #define MBA_DIFF_H_ -#include +#include #include typedef enum { diff --git a/src/core/marker-index.cc b/src/core/marker-index.cc index d622c7ec..b45ccf54 100644 --- a/src/core/marker-index.cc +++ b/src/core/marker-index.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "range.h" using std::default_random_engine; diff --git a/src/core/patch.cc b/src/core/patch.cc index 550f91db..e4d731dd 100644 --- a/src/core/patch.cc +++ b/src/core/patch.cc @@ -3,10 +3,10 @@ using std::optional; #include "text.h" #include "text-slice.h" -#include +#include #include #include -#include +#include #include #include diff --git a/src/core/regex.cc b/src/core/regex.cc index 71629642..8c0b9f51 100644 --- a/src/core/regex.cc +++ b/src/core/regex.cc @@ -1,5 +1,5 @@ #include "regex.h" -#include +#include #include "pcre2.h" using std::u16string; diff --git a/src/core/text-diff.cc b/src/core/text-diff.cc index 969b7ea7..e99f2863 100644 --- a/src/core/text-diff.cc +++ b/src/core/text-diff.cc @@ -2,7 +2,7 @@ #include "libmba-diff.h" #include "text-slice.h" #include -#include +#include #include #include diff --git a/src/core/text-slice.cc b/src/core/text-slice.cc index 22f298d7..eb9f8615 100644 --- a/src/core/text-slice.cc +++ b/src/core/text-slice.cc @@ -1,6 +1,6 @@ #include "text-slice.h" #include "text.h" -#include +#include TextSlice::TextSlice() : text{nullptr} {} From 8e3d90508ae14e8ef4d9229bd3dc9874289874ab Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 3 Dec 2020 06:16:28 -0600 Subject: [PATCH 10/10] use angle brackets for external headers --- src/bindings/bindings.cc | 2 +- src/bindings/marker-index-wrapper.cc | 2 +- src/bindings/marker-index-wrapper.h | 2 +- src/bindings/noop.h | 2 +- src/bindings/number-conversion.h | 2 +- src/bindings/point-wrapper.cc | 2 +- src/bindings/point-wrapper.h | 2 +- src/bindings/range-wrapper.cc | 2 +- src/bindings/range-wrapper.h | 2 +- src/bindings/string-conversion.h | 2 +- src/bindings/text-buffer-snapshot-wrapper.h | 2 +- src/bindings/text-buffer-wrapper.h | 2 +- src/bindings/text-reader.h | 2 +- src/bindings/text-writer.h | 2 +- src/core/regex.cc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/bindings/bindings.cc b/src/bindings/bindings.cc index fc9b31e1..f58bb520 100644 --- a/src/bindings/bindings.cc +++ b/src/bindings/bindings.cc @@ -1,5 +1,5 @@ #include "marker-index-wrapper.h" -#include "nan.h" +#include #include "patch-wrapper.h" #include "range-wrapper.h" #include "point-wrapper.h" diff --git a/src/bindings/marker-index-wrapper.cc b/src/bindings/marker-index-wrapper.cc index 138e096d..00727f5d 100644 --- a/src/bindings/marker-index-wrapper.cc +++ b/src/bindings/marker-index-wrapper.cc @@ -1,7 +1,7 @@ #include "marker-index-wrapper.h" #include #include "marker-index.h" -#include "nan.h" +#include #include "noop.h" #include using std::optional; diff --git a/src/bindings/marker-index-wrapper.h b/src/bindings/marker-index-wrapper.h index f6eaba13..0b232e01 100644 --- a/src/bindings/marker-index-wrapper.h +++ b/src/bindings/marker-index-wrapper.h @@ -1,4 +1,4 @@ -#include "nan.h" +#include #include "marker-index.h" #include using std::optional; diff --git a/src/bindings/noop.h b/src/bindings/noop.h index 6b446a5a..f02917d9 100644 --- a/src/bindings/noop.h +++ b/src/bindings/noop.h @@ -1,5 +1,5 @@ #pragma once -#include "nan.h" +#include static void noop(const Nan::FunctionCallbackInfo&) {} diff --git a/src/bindings/number-conversion.h b/src/bindings/number-conversion.h index 3a3f0fc1..c0c98b30 100644 --- a/src/bindings/number-conversion.h +++ b/src/bindings/number-conversion.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_NUMBER_CONVERSION_H #define SUPERSTRING_NUMBER_CONVERSION_H -#include "nan.h" +#include #include using std::optional; diff --git a/src/bindings/point-wrapper.cc b/src/bindings/point-wrapper.cc index 7bd159f7..9d5a0c25 100644 --- a/src/bindings/point-wrapper.cc +++ b/src/bindings/point-wrapper.cc @@ -1,6 +1,6 @@ #include "point-wrapper.h" #include -#include "nan.h" +#include using namespace v8; diff --git a/src/bindings/point-wrapper.h b/src/bindings/point-wrapper.h index 52e500fc..e380a0b5 100644 --- a/src/bindings/point-wrapper.h +++ b/src/bindings/point-wrapper.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_POINT_WRAPPER_H #define SUPERSTRING_POINT_WRAPPER_H -#include "nan.h" +#include #include using std::optional; #include "point.h" diff --git a/src/bindings/range-wrapper.cc b/src/bindings/range-wrapper.cc index b0aaf5ab..72a7393b 100644 --- a/src/bindings/range-wrapper.cc +++ b/src/bindings/range-wrapper.cc @@ -1,6 +1,6 @@ #include "range-wrapper.h" #include "point-wrapper.h" -#include "nan.h" +#include using namespace v8; diff --git a/src/bindings/range-wrapper.h b/src/bindings/range-wrapper.h index 9df83e6f..7755f6fc 100644 --- a/src/bindings/range-wrapper.h +++ b/src/bindings/range-wrapper.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_RANGE_WRAPPER_H #define SUPERSTRING_RANGE_WRAPPER_H -#include "nan.h" +#include #include using std::optional; #include "point.h" diff --git a/src/bindings/string-conversion.h b/src/bindings/string-conversion.h index 61ebfc64..abeeeee7 100644 --- a/src/bindings/string-conversion.h +++ b/src/bindings/string-conversion.h @@ -2,7 +2,7 @@ #define SUPERSTRING_STRING_CONVERSION_H #include -#include "nan.h" +#include #include using std::optional; #include "text.h" diff --git a/src/bindings/text-buffer-snapshot-wrapper.h b/src/bindings/text-buffer-snapshot-wrapper.h index bb23b4ce..ee2c7298 100644 --- a/src/bindings/text-buffer-snapshot-wrapper.h +++ b/src/bindings/text-buffer-snapshot-wrapper.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_TEXT_BUFFER_SNAPSHOT_WRAPPER_H #define SUPERSTRING_TEXT_BUFFER_SNAPSHOT_WRAPPER_H -#include "nan.h" +#include #include // This header can be included by other native node modules, allowing them diff --git a/src/bindings/text-buffer-wrapper.h b/src/bindings/text-buffer-wrapper.h index ee2261ba..78895456 100644 --- a/src/bindings/text-buffer-wrapper.h +++ b/src/bindings/text-buffer-wrapper.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_TEXT_BUFFER_WRAPPER_H #define SUPERSTRING_TEXT_BUFFER_WRAPPER_H -#include "nan.h" +#include #include "text-buffer.h" #include diff --git a/src/bindings/text-reader.h b/src/bindings/text-reader.h index 200b6ce6..7fb6d4b0 100644 --- a/src/bindings/text-reader.h +++ b/src/bindings/text-reader.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_TEXT_READER_H #define SUPERSTRING_TEXT_READER_H -#include "nan.h" +#include #include "text.h" #include "text-buffer.h" #include "encoding-conversion.h" diff --git a/src/bindings/text-writer.h b/src/bindings/text-writer.h index 97fde24b..9d699e38 100644 --- a/src/bindings/text-writer.h +++ b/src/bindings/text-writer.h @@ -1,7 +1,7 @@ #ifndef SUPERSTRING_TEXT_WRITER_H #define SUPERSTRING_TEXT_WRITER_H -#include "nan.h" +#include #include "text.h" #include "encoding-conversion.h" diff --git a/src/core/regex.cc b/src/core/regex.cc index 8c0b9f51..c9405d9f 100644 --- a/src/core/regex.cc +++ b/src/core/regex.cc @@ -1,6 +1,6 @@ #include "regex.h" #include -#include "pcre2.h" +#include using std::u16string; using MatchResult = Regex::MatchResult;