mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
cmake+ci: run clang-tidy (#512)
* cmake+ci: run clang-tidy
* Remove DESCRIPTION from LEGO1/LegoOmni.mingw.def
* Add initial .clang-tidy and fixes
* fix file perms
* Comment out DESCRIPTION
* Remove LegoEntity::~LegoEntity and MxPresenter::~MxPresenter from mingw's LEGO1.def
* Looks like clang is allergic to the libs in the directx5 SDK
* Update .clang-tidy
* Fix typo in .clang-tidy
* Attempt to generate an action error
* Revert "Attempt to generate an action error"
This reverts commit 96c4c65fed
.
* cmake: test with -Wparentheses + optionally with -Werror
* ci: -k0 is a Ninja argument
* Use -Werror only for msys2 builds
* cmake: only emit warnings for specific warnings
* cmake: and don't do -Werror/-WX anymore
* Fix warnings
* Fix mingw warnings
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:

committed by
GitHub

parent
97d1ba7c71
commit
9e686e2a87
@@ -46,7 +46,7 @@ public:
|
||||
m_resizeOption = e_noExpand;
|
||||
}
|
||||
|
||||
virtual ~MxHashTable() override;
|
||||
~MxHashTable() override;
|
||||
|
||||
void Resize();
|
||||
void Add(T);
|
||||
@@ -99,8 +99,9 @@ MxBool MxHashTableCursor<T>::Find(T p_obj)
|
||||
MxHashTableNode<T>* t = m_table->m_slots[bucket];
|
||||
|
||||
while (t) {
|
||||
if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj))
|
||||
if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj)) {
|
||||
m_match = t;
|
||||
}
|
||||
t = t->m_next;
|
||||
}
|
||||
|
||||
@@ -122,8 +123,9 @@ void MxHashTableCursor<T>::DeleteMatch()
|
||||
{
|
||||
// Cut the matching node out of the linked list
|
||||
// by updating pointer references.
|
||||
if (m_match == NULL)
|
||||
if (m_match == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_match->m_prev) {
|
||||
m_match->m_prev->m_next = m_match->m_next;
|
||||
@@ -134,8 +136,9 @@ void MxHashTableCursor<T>::DeleteMatch()
|
||||
m_table->m_slots[bucket] = m_match->m_next;
|
||||
}
|
||||
|
||||
if (m_match->m_next)
|
||||
if (m_match->m_next) {
|
||||
m_match->m_next->m_prev = m_match->m_prev;
|
||||
}
|
||||
|
||||
m_table->m_customDestructor(m_match->m_obj);
|
||||
delete m_match;
|
||||
@@ -210,8 +213,9 @@ inline void MxHashTable<T>::NodeInsert(MxHashTableNode<T>* p_node)
|
||||
|
||||
p_node->m_next = m_slots[bucket];
|
||||
|
||||
if (m_slots[bucket])
|
||||
if (m_slots[bucket]) {
|
||||
m_slots[bucket]->m_prev = p_node;
|
||||
}
|
||||
|
||||
m_slots[bucket] = p_node;
|
||||
this->m_count++;
|
||||
@@ -220,8 +224,9 @@ inline void MxHashTable<T>::NodeInsert(MxHashTableNode<T>* p_node)
|
||||
template <class T>
|
||||
inline void MxHashTable<T>::Add(T p_newobj)
|
||||
{
|
||||
if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio)
|
||||
if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio) {
|
||||
MxHashTable<T>::Resize();
|
||||
}
|
||||
|
||||
MxU32 hash = Hash(p_newobj);
|
||||
MxHashTableNode<T>* node = new MxHashTableNode<T>(p_newobj, hash);
|
||||
|
Reference in New Issue
Block a user