From 3a2e59bbc201e05a7eb04b75c362be74d05eb7dc Mon Sep 17 00:00:00 2001 From: fangyunzhong Date: Fri, 4 Nov 2022 18:06:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=8A=E8=AD=A6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangyunzhong --- src/key_parser.cpp | 2 +- src/resource_pack.cpp | 4 ++-- src/resource_util.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/key_parser.cpp b/src/key_parser.cpp index 5534186..db9a8f8 100644 --- a/src/key_parser.cpp +++ b/src/key_parser.cpp @@ -261,7 +261,7 @@ void KeyParser::PushLSR(const string &folderName, KeyType type, vector keyParam.keyType = type; keyParam.value = 0; for (size_t i = 0; i < folderName.size(); i++) { - keyParam.value = (keyParam.value << 8) | (folderName[i] & 0xff); + keyParam.value = (keyParam.value << 8) | (folderName[i] & 0xff); // Move 8 bits to the left } keyparams.push_back(keyParam); } diff --git a/src/resource_pack.cpp b/src/resource_pack.cpp index 54d4e08..1138c8d 100644 --- a/src/resource_pack.cpp +++ b/src/resource_pack.cpp @@ -218,7 +218,7 @@ uint32_t ResourcePack::GenerateCplusHeader(const string &headerPath) const transform(name.begin(), name.end(), name.begin(), ::toupper); buffer << "const int32_t " << name << " = "; buffer << "0x" << hex << setw(8) << setfill('0') << resourceId.id << ";\n"; - }, [](stringstream &buffer){ + }, [](stringstream &buffer) { buffer << "}\n"; buffer << "#endif"; }); @@ -243,7 +243,7 @@ uint32_t ResourcePack::GenerateJsHeader(const std::string &headerPath) const buffer << ",\n"; } buffer << " " << resourceId.name << " : " << resourceId.id; - }, [](stringstream &buffer){ + }, [](stringstream &buffer) { buffer << "\n" << " " << "}\n"; buffer << "}\n"; }); diff --git a/src/resource_util.cpp b/src/resource_util.cpp index 159b79b..4da5f13 100644 --- a/src/resource_util.cpp +++ b/src/resource_util.cpp @@ -161,7 +161,7 @@ string ResourceUtil::ComposeStrings(const vector &contents, bool addNull size += sizeof(char); } result.append(sizeof(char), (size & 0xff)); - result.append(sizeof(char), (size >> 8)); + result.append(sizeof(char), (size >> 8)); // Move 8 bits to the right result.append(iter); result.append(sizeof(char), '\0'); if (result.length() > UINT16_MAX) {