mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 19:42:39 +08:00
Remove some format rule (#10919)
* remove some rules * format all codes with new format rule
This commit is contained in:
@@ -46,9 +46,9 @@ const ccstd::unordered_map<ccstd::string, ccstd::string> &getFontFamilyNameMap()
|
||||
}
|
||||
|
||||
static bool JSB_loadFont(se::State &s) {
|
||||
const auto & args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto &args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc >= 1) {
|
||||
s.rval().setNull();
|
||||
|
||||
@@ -60,8 +60,8 @@ static bool JSB_loadFont(se::State &s) {
|
||||
ok &= sevalue_to_native(args[1], &source);
|
||||
SE_PRECONDITION2(ok, false, "JSB_loadFont : Error processing argument: source");
|
||||
|
||||
ccstd::string fontFilePath;
|
||||
std::regex re("url\\(\\s*'\\s*(.*?)\\s*'\\s*\\)");
|
||||
ccstd::string fontFilePath;
|
||||
std::regex re("url\\(\\s*'\\s*(.*?)\\s*'\\s*\\)");
|
||||
std::match_results<ccstd::string::const_iterator> results;
|
||||
if (std::regex_search(source.cbegin(), source.cend(), results, re)) {
|
||||
fontFilePath = results[1].str();
|
||||
|
||||
Reference in New Issue
Block a user