Skip to content

Commit f1bc003

Browse files
committed
chore: copy changes to work on clangd
1 parent bfd89aa commit f1bc003

File tree

5 files changed

+6
-21
lines changed

5 files changed

+6
-21
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if(MSVC)
4747
endif()
4848

4949
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
50-
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_JS_INC} "include/" "node_modules/node-addon-api" "../../node_modules/node-addon-api" "node_modules/node-api-headers/include" "../../node_modules/node-api-headers/include")
50+
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_JS_INC} "include/" "${CMAKE_CURRENT_SOURCE_DIR}/node_modules/node-addon-api" "${CMAKE_CURRENT_SOURCE_DIR}/node_modules" "${CMAKE_CURRENT_SOURCE_DIR}/node_modules/node-api-headers/include")
5151

5252
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
5353
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_JS_LIB} ${LIBSESSION_STATIC_BUNDLE_LIBS})

include/meta/meta_base_wrapper.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <napi.h>
44

55
#include <optional>
6-
#include <span>
76
#include <vector>
87

98
#include "../base_config.hpp"

include/pro/pro.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44
#include <oxenc/base64.h>
55
#include <oxenc/hex.h>
66

7-
#include <algorithm>
8-
#include <span>
97
#include <vector>
108

119
#include "../meta/meta_base_wrapper.hpp"
1210
#include "../utilities.hpp"
13-
#include "oxen/log.hpp"
14-
#include "pro/types.hpp"
15-
#include "session/attachments.hpp"
16-
#include "session/config/user_profile.hpp"
17-
#include "session/random.hpp"
11+
#include "meta/meta_base_wrapper.hpp"
1812
#include "session/session_protocol.hpp"
1913

2014
namespace session::nodeapi {

include/pro/types.hpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@
44
#include <oxenc/base64.h>
55
#include <oxenc/hex.h>
66

7-
#include <algorithm>
8-
#include <span>
9-
#include <vector>
10-
11-
#include "../utilities.hpp"
12-
#include "oxen/log.hpp"
13-
#include "pro/pro.hpp"
14-
#include "session/attachments.hpp"
15-
#include "session/config/user_profile.hpp"
16-
#include "session/multi_encrypt.hpp"
17-
#include "session/random.hpp"
7+
#include "session/config/pro.hpp"
8+
#include "session/session_protocol.hpp"
9+
#include "utilities.hpp"
1810

1911
namespace session::nodeapi {
2012

include/utilities.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ auto wrapResult(const Napi::Env& env, Call&& call) {
303303
if constexpr (std::is_base_of_v<Napi::Value, Result>)
304304
return res;
305305
else
306-
return toJs(env, std::move(res));
306+
return toJs<Result>(env, std::move(res));
307307
}
308308
} catch (const std::exception& e) {
309309
throw Napi::Error::New(env, e.what());

0 commit comments

Comments
 (0)