Explicitly require and use capital NULL and ITG everywhere for sync bias, comment fix, nullptr check for group

This commit is contained in:
Crash Cringle
2025-03-03 23:25:32 -08:00
committed by teejusb
parent 35570a0880
commit dbbcc57112
3 changed files with 13 additions and 6 deletions
+6 -5
View File
@@ -36,8 +36,9 @@ Group::Group() {
m_sBannerPath = "";
}
Group::~Group() {
SONGMAN->GetGroupGroupMap().erase(m_sGroupName);
Group::~Group()
{
}
Group::Group(const RString& sDir, const RString& sGroupDirName) {
@@ -63,7 +64,7 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) {
Trim(sVersion);
// Only read the Pack.ini if the version is set
// Otherwise log a warning and skip reading the
// Otherwise log a warning and use default Pack.ini values
if (!sVersion.empty()) {
m_bHasPackIni = true;
m_iVersion = StringToInt(sVersion);
@@ -94,9 +95,9 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) {
ini.GetValue("Group", "SyncOffset", sValue);
Trim(sValue);
if (!sValue.empty()) {
if (sValue.CompareNoCase("null") == 0) {
if (sValue == "NULL") {
m_fSyncOffset = 0.0f;
} else if (sValue.CompareNoCase("itg") == 0) {
} else if (sValue == "ITG") {
m_fSyncOffset = -0.009f;
} else {
LOG->Warn("Group::Group: Invalid SyncOffset value: %s in Pack.ini. Valid values are NULL and ITG. Defaulting to NULL.", sValue.c_str());