[Scummvm-git-logs] scummvm master -> 2566ce9b880e1d03de9a6572e38572bdffd7a0fa
dreammaster
noreply at scummvm.org
Sun Sep 14 21:24:57 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2566ce9b88 BAGEL: Fix compiler warnings
Commit: 2566ce9b880e1d03de9a6572e38572bdffd7a0fa
https://github.com/scummvm/scummvm/commit/2566ce9b880e1d03de9a6572e38572bdffd7a0fa
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-14T14:24:51-07:00
Commit Message:
BAGEL: Fix compiler warnings
Changed paths:
engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
engines/bagel/mfc/afx.h
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
index 085dd9cc9cb..e8b260b9ad9 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
@@ -749,36 +749,37 @@ void CNotebook::OnLButtonDown(unsigned int nFlags, CPoint point) {
((*pNoteList).m_pPrev != nullptr)) { // ... scroll up if not at first item
pNoteList = (*pNoteList).m_pPrev;
pDC = GetDC();
- } else // if click is in lower curl, then
- if (ScrollBotRect.PtInRect(point) && // ... scroll down if not show last item
- (pKeyNote == nullptr) &&
- (pNoteList != nullptr) &&
- ((*pNoteList).m_pNext != nullptr)) {
- pNoteList = (*pNoteList).m_pNext;
- pDC = GetDC();
- } else if (PersonRect.PtInRect(point)) { // play the person sound file
- if (lpsPersonSoundSpec != nullptr) {
- pSound = new CSound(this, lpsPersonSoundSpec, SOUND_WAVE | SOUND_QUEUE | SOUND_AUTODELETE);
- (*pSound).setDrivePath(lpMetaGameStruct->m_chCDPath);
- (*pSound).play();
- }
- } else if (PlaceRect.PtInRect(point)) { // play the place sound file
- if (lpsPlaceSoundSpec != nullptr) {
- pSound = new CSound(this, lpsPlaceSoundSpec, SOUND_WAVE | SOUND_QUEUE | SOUND_AUTODELETE);
- (*pSound).setDrivePath(lpMetaGameStruct->m_chCDPath);
- (*pSound).play();
- }
+ }
+ // if click is in lower curl, then
+ // ... scroll down if not show last item
+ else if (ScrollBotRect.PtInRect(point) &&
+ (pKeyNote == nullptr) &&
+ (pNoteList != nullptr) &&
+ ((*pNoteList).m_pNext != nullptr)) {
+ pNoteList = (*pNoteList).m_pNext;
+ pDC = GetDC();
+ } else if (PersonRect.PtInRect(point)) { // play the person sound file
+ if (lpsPersonSoundSpec != nullptr) {
+ pSound = new CSound(this, lpsPersonSoundSpec, SOUND_WAVE | SOUND_QUEUE | SOUND_AUTODELETE);
+ (*pSound).setDrivePath(lpMetaGameStruct->m_chCDPath);
+ (*pSound).play();
}
-
-
- if (pDC != nullptr) { // update the noteboook entry if required
- UpdateNote(pDC);
- ReleaseDC(pDC);
+ } else if (PlaceRect.PtInRect(point)) { // play the place sound file
+ if (lpsPlaceSoundSpec != nullptr) {
+ pSound = new CSound(this, lpsPlaceSoundSpec, SOUND_WAVE | SOUND_QUEUE | SOUND_AUTODELETE);
+ (*pSound).setDrivePath(lpMetaGameStruct->m_chCDPath);
+ (*pSound).play();
}
+ }
+
+ if (pDC != nullptr) { // update the noteboook entry if required
+ UpdateNote(pDC);
+ ReleaseDC(pDC);
+ }
- OnMouseMove(nFlags, point); // do standard mouse movement
+ OnMouseMove(nFlags, point); // do standard mouse movement
- CDialog::OnLButtonDown(nFlags, point); // do standard mouse clicking
+ CDialog::OnLButtonDown(nFlags, point); // do standard mouse clicking
}
diff --git a/engines/bagel/mfc/afx.h b/engines/bagel/mfc/afx.h
index 084b4c7c7f1..6ac941f5c2c 100644
--- a/engines/bagel/mfc/afx.h
+++ b/engines/bagel/mfc/afx.h
@@ -59,7 +59,7 @@ class CFileException;
#define ASSERT_KINDOF(class_name, object) \
assert((object)->IsKindOf(RUNTIME_CLASS(class_name)))
-#define ASSERT_VALID(X) ((X) != nullptr)
+#define ASSERT_VALID(X) assert((X) != nullptr)
struct CRuntimeClass {
const char *m_lpszClassName;
More information about the Scummvm-git-logs
mailing list