Skip to content

Commit

Permalink
[unity]重构,把v8头文件include放到一个文件
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Mar 25, 2024
1 parent b989f49 commit 153c54f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 27 deletions.
3 changes: 0 additions & 3 deletions unity/native_src/Inc/BackendEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
*/

#pragma once
#pragma warning(push, 0)
#include "v8.h"
#pragma warning(pop)

#include <map>
#include <algorithm>
Expand Down
5 changes: 5 additions & 0 deletions unity/native_src/Inc/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

#pragma once

#pragma warning(push, 0)
#include "libplatform/libplatform.h"
#include "v8.h"
#pragma warning(pop)

#if !defined(PUERTS_NAMESPACE)
#if defined(WITH_QJS_NAMESPACE_SUFFIX)
#define PUERTS_NAMESPACE puerts_qjs
Expand Down
5 changes: 0 additions & 5 deletions unity/native_src/Inc/JSEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
#include <memory>
#include "Common.h"

#pragma warning(push, 0)
#include "libplatform/libplatform.h"
#include "v8.h"
#pragma warning(pop)

#include "JSFunction.h"
#include "V8InspectorImpl.h"
#include "BackendEnv.h"
Expand Down
5 changes: 0 additions & 5 deletions unity/native_src/Inc/JSFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
#include <string>
#include "Common.h"

#pragma warning(push, 0)
#include "libplatform/libplatform.h"
#include "v8.h"
#pragma warning(pop)

#include "V8Utils.h"

#define FUNCTION_INDEX_KEY "_psid"
Expand Down
5 changes: 0 additions & 5 deletions unity/native_src/Inc/V8Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
#include <sstream>
#include "Common.h"

#pragma warning(push, 0)
#include "libplatform/libplatform.h"
#include "v8.h"
#pragma warning(pop)

namespace PUERTS_NAMESPACE
{
const intptr_t OBJECT_MAGIC = 0xFA0E5D68; // a random value
Expand Down
5 changes: 0 additions & 5 deletions unity/native_src/Src/BackendEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
#include "Log.h"
#include "PromiseRejectCallback.hpp"

#pragma warning(push, 0)
#include "libplatform/libplatform.h"
#include "v8.h"
#pragma warning(pop)

#if WITH_NODEJS

#pragma warning(push, 0)
Expand Down
5 changes: 1 addition & 4 deletions unity/native_src/Src/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

#include "Log.h"
#include <stdarg.h>

#pragma warning(push, 0)
#include "v8.h"
#pragma warning(pop)
#include "Common.h"

typedef void(*LogCallback)(const char* value);

Expand Down

0 comments on commit 153c54f

Please sign in to comment.