mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
[ci skip][AUTO]: Automated clang-format update: 5ce68bff8eac275831019b728ce8e79c677fbb88 (#10474) (#10488)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
This commit is contained in:
@@ -57,7 +57,6 @@
|
||||
#define CC_FILEUTILS_APPLE_ENABLE_OBJC 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CC_ENABLE_CACHE_JSB_FUNC_RESULT
|
||||
#define CC_ENABLE_CACHE_JSB_FUNC_RESULT 1
|
||||
#endif
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
#include "cocos/bindings/auto/jsb_gfx_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_network_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_pipeline_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_scene_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_render_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_scene_auto.h"
|
||||
#include "cocos/bindings/dop/jsb_dop.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_assets_manual.h"
|
||||
|
||||
@@ -474,18 +474,18 @@ static bool webSocketGetExtensions(se::State &s) {
|
||||
}
|
||||
SE_BIND_PROP_GET(webSocketGetExtensions)
|
||||
|
||||
#define WEBSOCKET_DEFINE_READONLY_INT_FIELD(full_name, value) \
|
||||
static bool full_name(se::State &s) { \
|
||||
const auto &args = s.args(); \
|
||||
int argc = (int)args.size(); \
|
||||
if (argc == 0) { \
|
||||
s.rval().setInt32(value); \
|
||||
return true; \
|
||||
} \
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting 0", argc); \
|
||||
return false; \
|
||||
} \
|
||||
SE_BIND_PROP_GET(full_name)
|
||||
#define WEBSOCKET_DEFINE_READONLY_INT_FIELD(full_name, value) \
|
||||
static bool full_name(se::State &s) { \
|
||||
const auto &args = s.args(); \
|
||||
int argc = (int)args.size(); \
|
||||
if (argc == 0) { \
|
||||
s.rval().setInt32(value); \
|
||||
return true; \
|
||||
} \
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting 0", argc); \
|
||||
return false; \
|
||||
} \
|
||||
SE_BIND_PROP_GET(full_name)
|
||||
|
||||
WEBSOCKET_DEFINE_READONLY_INT_FIELD(Websocket_CONNECTING, static_cast<int>(cc::network::WebSocket::State::CONNECTING))
|
||||
WEBSOCKET_DEFINE_READONLY_INT_FIELD(Websocket_OPEN, static_cast<int>(cc::network::WebSocket::State::OPEN))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
// clang-format off
|
||||
// clang-format off
|
||||
#include "base/Macros.h"
|
||||
#include "uv.h"
|
||||
// clang-format on
|
||||
|
||||
@@ -93,30 +93,30 @@ void schedule_task_into_server_thread_task_queue(uv_async_t *asyn, std::function
|
||||
namespace cc {
|
||||
namespace network {
|
||||
|
||||
#define RUN_IN_GAMETHREAD(task) \
|
||||
do { \
|
||||
CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=]() { \
|
||||
task; \
|
||||
}); \
|
||||
} while (0)
|
||||
#define RUN_IN_GAMETHREAD(task) \
|
||||
do { \
|
||||
CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=]() { \
|
||||
task; \
|
||||
}); \
|
||||
} while (0)
|
||||
|
||||
#define DISPATCH_CALLBACK_IN_GAMETHREAD() \
|
||||
do { \
|
||||
data->setCallback([callback](const ccstd::string &msg) { \
|
||||
auto wrapper = [callback, msg]() { callback(msg); }; \
|
||||
RUN_IN_GAMETHREAD(wrapper()); \
|
||||
}); \
|
||||
} while (0)
|
||||
#define DISPATCH_CALLBACK_IN_GAMETHREAD() \
|
||||
do { \
|
||||
data->setCallback([callback](const ccstd::string &msg) { \
|
||||
auto wrapper = [callback, msg]() { callback(msg); }; \
|
||||
RUN_IN_GAMETHREAD(wrapper()); \
|
||||
}); \
|
||||
} while (0)
|
||||
|
||||
#define RUN_IN_SERVERTHREAD(task) \
|
||||
do { \
|
||||
schedule_task_into_server_thread_task_queue(&_async, [=]() { \
|
||||
task; \
|
||||
}); \
|
||||
} while (0)
|
||||
#define RUN_IN_SERVERTHREAD(task) \
|
||||
do { \
|
||||
schedule_task_into_server_thread_task_queue(&_async, [=]() { \
|
||||
task; \
|
||||
}); \
|
||||
} while (0)
|
||||
|
||||
//#define LOGE() CCLOG("WSS: %s", __FUNCTION__)
|
||||
#define LOGE()
|
||||
//#define LOGE() CCLOG("WSS: %s", __FUNCTION__)
|
||||
#define LOGE()
|
||||
|
||||
DataFrame::DataFrame(const ccstd::string &data) : _isBinary(false) {
|
||||
_underlyingData.resize(data.size() + LWS_PRE);
|
||||
|
||||
Reference in New Issue
Block a user