Skip to content

Commit 9e00193

Browse files
committed
tier1: padding offset.
1 parent 657250c commit 9e00193

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/tier1/utl_dict.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#pragma semicolon 1
1313

1414
#define UTL_DICT_TAG "[UtlDict]"
15-
#define UTL_DICT_VERSION "1.0.1"
15+
#define UTL_DICT_VERSION "1.0.2"
1616

1717
/**
1818
* Author: blueblur
1919
* Date: 2025-11-14
2020
* url: https://github.com/blueblur0730/modified-plugins
21-
* Version: 1.0.1
21+
* Version: 1.0.2
2222
*/
2323

2424
enum EDictCompareType
@@ -133,7 +133,7 @@ methodmap UtlDict < AddressBase {
133133
#if defined _smmem_included_
134134
// 何意味
135135
public void EnsureCapacity(int num, int size = 4) {
136-
this.m_Elements.m_Tree.EnsureCapacity(num, size);
136+
this.m_Elements.m_Tree.EnsureCapacity(num, 8 + size);
137137
}
138138

139139
public void RemoveAt(int elem, int size = 4, NumberType elementSize = NumberType_Int32, UtlRBTreeDestructorFunc destructor) {

include/tier1/utl_map.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#pragma semicolon 1
1313

1414
#define UTL_MAP_TAG "[UtlMap]"
15-
#define UTL_MAP_VERSION "1.0.2"
15+
#define UTL_MAP_VERSION "1.0.3"
1616

1717
/**
1818
* Author: blueblur
1919
* Date: 2025-11-13
2020
* url: https://github.com/blueblur0730/modified-plugins
21-
* Version: 1.0.2
21+
* Version: 1.0.3
2222
*/
2323

2424
/*

include/tier1/utl_rbtree.inc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#pragma semicolon 1
1313

1414
#define UTL_RBTREE_TAG "[UtlRBTree]"
15-
#define UTL_RBTREE_VERSION "1.3.3"
15+
#define UTL_RBTREE_VERSION "1.3.4"
1616

1717
/**
1818
* Author: blueblur
1919
* Date: 2025-11-11
2020
* url: https://github.com/blueblur0730/modified-plugins
21-
* Version: 1.3.3
21+
* Version: 1.3.4
2222
*/
2323

2424
/*
@@ -391,15 +391,15 @@ methodmap UtlRBTree < AddressBase {
391391
}
392392

393393
public int LeftChild(int i, int size = 4) {
394-
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * size).m_Left : UtlRBTree.InvalidIndex();
394+
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * (8 + size)).m_Left : UtlRBTree.InvalidIndex();
395395
}
396396

397397
public int RightChild(int i, int size = 4) {
398-
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * size).m_Right : UtlRBTree.InvalidIndex();
398+
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * (8 + size)).m_Right : UtlRBTree.InvalidIndex();
399399
}
400400

401401
public int Parent(int i, int size = 4) {
402-
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * size).m_Parent : UtlRBTree.InvalidIndex();
402+
return i != UtlRBTree.InvalidIndex() ? view_as<UtlRBTreeNode_t>(view_as<any>(this.m_pMemory) + i * (8 + size)).m_Parent : UtlRBTree.InvalidIndex();
403403
}
404404

405405
public bool IsLeftChild(int i, int size = 4) {
@@ -450,7 +450,7 @@ methodmap UtlRBTree < AddressBase {
450450

451451
public UtlRBTreeLinks_t Links(int i, int size = 4) {
452452
Assert(i != UtlRBTree.InvalidIndex(), UTL_RBTREE_TAG, "Param index (%d) out of bounds", i);
453-
return view_as<UtlRBTreeLinks_t>(view_as<any>(this.m_pMemory) + i * size);
453+
return view_as<UtlRBTreeLinks_t>(view_as<any>(this.m_pMemory) + i * (8 + size));
454454
}
455455

456456
public bool IsRed(int i, int size = 4) {
@@ -1224,7 +1224,7 @@ methodmap UtlRBTree < AddressBase {
12241224
int it = this.IsIdxValid(this.m_LastAlloc) ? (this.IsIdxValid(this.m_LastAlloc + 1) ? this.m_LastAlloc + 1 : UtlRBTree.InvalidIndex()) : (this.IsIdxValid(0) ? 0 : UtlRBTree.InvalidIndex());
12251225

12261226
if (!this.IsIdxValid(it)) {
1227-
this.Grow(_, size);
1227+
this.Grow(_, (8 + size));
12281228

12291229
it = this.IsIdxValid(this.m_LastAlloc) ? (this.IsIdxValid(this.m_LastAlloc + 1) ? this.m_LastAlloc + 1 : UtlRBTree.InvalidIndex()) : (this.IsIdxValid(0) ? 0 : UtlRBTree.InvalidIndex());
12301230
Assert(this.IsIdxValid(it), UTL_RBTREE_TAG, "CUtlRBTree overflow!");

0 commit comments

Comments
 (0)