mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-28 10:54:16 +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
@@ -39,8 +39,9 @@ void MxDSMediaAction::CopyFrom(MxDSMediaAction& p_dsMediaAction)
|
||||
// FUNCTION: LEGO1 0x100c8dc0
|
||||
MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction)
|
||||
{
|
||||
if (this == &p_dsMediaAction)
|
||||
if (this == &p_dsMediaAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSAction::operator=(p_dsMediaAction);
|
||||
this->CopyFrom(p_dsMediaAction);
|
||||
@@ -52,8 +53,9 @@ MxDSAction* MxDSMediaAction::Clone()
|
||||
{
|
||||
MxDSMediaAction* clone = new MxDSMediaAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -61,18 +63,21 @@ MxDSAction* MxDSMediaAction::Clone()
|
||||
// FUNCTION: LEGO1 0x100c8e80
|
||||
void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
|
||||
{
|
||||
if (this->m_mediaSrcPath == p_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath == p_mediaSrcPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
delete[] this->m_mediaSrcPath;
|
||||
|
||||
if (p_mediaSrcPath) {
|
||||
this->m_mediaSrcPath = new char[strlen(p_mediaSrcPath) + 1];
|
||||
if (this->m_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath) {
|
||||
strcpy(this->m_mediaSrcPath, p_mediaSrcPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
this->m_mediaSrcPath = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8f00
|
||||
@@ -86,10 +91,12 @@ MxU32 MxDSMediaAction::GetSizeOnDisk()
|
||||
{
|
||||
MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk();
|
||||
|
||||
if (this->m_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath) {
|
||||
totalSizeOnDisk += strlen(this->m_mediaSrcPath) + 1;
|
||||
else
|
||||
}
|
||||
else {
|
||||
totalSizeOnDisk++;
|
||||
}
|
||||
|
||||
totalSizeOnDisk += 24;
|
||||
this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
||||
|
||||
Reference in New Issue
Block a user