From a00ea0423a65672f1f3b5bd2fc4e500870d78c76 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 1 Nov 2022 12:13:59 -0500 Subject: [PATCH] =?UTF-8?q?chore(core):=20ldml:=20cleanup=20=20=20?= =?UTF-8?q?=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - minor cleanup in the .cpp #5015 --- core/src/kmx/kmx_plus.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/core/src/kmx/kmx_plus.cpp b/core/src/kmx/kmx_plus.cpp index 1e7ccc8dbd..03bbb0e559 100644 --- a/core/src/kmx/kmx_plus.cpp +++ b/core/src/kmx/kmx_plus.cpp @@ -143,14 +143,14 @@ COMP_KMXPLUS_HEADER::valid(KMX_DWORD length) const { bool COMP_KMXPLUS_KEYS::valid(KMX_DWORD _kmn_unused(length)) const { - DebugLog(" count: #0x%X\n", this->count); + DebugLog(" count: #0x%X\n", count); if (header.size < sizeof(*this)+(sizeof(entries[0])*count)) { DebugLog("header.size < expected size"); return false; } - for (KMX_DWORD i = 0; icount; i++) { + for (KMX_DWORD i = 0; ientries[i]; + const COMP_KMXPLUS_KEYS_ENTRY& entry = entries[i]; DebugLog(" vkey\t0x%X\n", entry.vkey); DebugLog(" mod\t0x%X\n", entry.mod); DebugLog(" flags\t0x%X\n", entry.flags); @@ -178,8 +178,8 @@ COMP_KMXPLUS_LOCA::valid(KMX_DWORD _kmn_unused(length)) const { return false; } // TODO-LDML - for(KMX_DWORD i=0; icount; i++) { - DebugLog(" Locale #%d: #0x%X\n", i, this->entries[i].locale); + for(KMX_DWORD i=0; iauthor); - DebugLog(" conform:\t#0x%X\n", this->conform); - DebugLog(" layout:\t#0x%X\n", this->layout); - DebugLog(" normalization:\t#0x%X\n", this->normalization); - DebugLog(" indicator:\t#0x%X\n", this->indicator); - DebugLog(" settings:\t0x%X\n", this->settings); + DebugLog(" author:\t#0x%X\n", author); + DebugLog(" conform:\t#0x%X\n", conform); + DebugLog(" layout:\t#0x%X\n", layout); + DebugLog(" normalization:\t#0x%X\n", normalization); + DebugLog(" indicator:\t#0x%X\n", indicator); + DebugLog(" settings:\t0x%X\n", settings); return true; } bool COMP_KMXPLUS_VKEY::valid(KMX_DWORD _kmn_unused(length)) const { - DebugLog("vkey: count 0x%X\n", this->count); + DebugLog("vkey: count 0x%X\n", count); if (header.size < sizeof(*this)+(sizeof(entries[0])*count)) { DebugLog("header.size < expected size"); return false; @@ -225,12 +225,12 @@ COMP_KMXPLUS_DISP::valid(KMX_DWORD _kmn_unused(length)) const { bool COMP_KMXPLUS_STRS::valid(KMX_DWORD _kmn_unused(length)) const { - DebugLog("strs: count 0x%X\n", this->count); + DebugLog("strs: count 0x%X\n", count); if (header.size < sizeof(*this)+(sizeof(entries[0])*count)) { DebugLog("header.size < expected size"); return false; } - for (KMX_DWORD i=0; icount; i++) { + for (KMX_DWORD i=0; itotal); - DebugLog("sect: count 0x%X\n", this->count); + DebugLog("sect: total 0x%X\n", total); + DebugLog("sect: count 0x%X\n", count); if (header.size < sizeof(*this)+(sizeof(entries[0])*count)) { DebugLog("header.size < expected size"); return false; @@ -261,8 +261,8 @@ COMP_KMXPLUS_SECT::valid(KMX_DWORD length) const { // now validate each component bool overall_valid = true; - for (KMX_DWORD i = 0; i < this->count; i++) { - const COMP_KMXPLUS_SECT_ENTRY& entry = this->entries[i]; + for (KMX_DWORD i = 0; i < count; i++) { + const COMP_KMXPLUS_SECT_ENTRY& entry = entries[i]; DebugLog("%c%c%c%c #%d: %X @ %X\n", DEBUG_IDENT(entry.sect), i, entry.sect, entry.offset); if(!validate_section_name(entry.sect)) { return false;