[Scummvm-git-logs] scummvm master -> f8c025dbf020fbbe758cb709057baa4d7589edc2
digitall
noreply at scummvm.org
Sat Jun 11 21:39:06 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f8c025dbf0 TINSEL: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings
Commit: f8c025dbf020fbbe758cb709057baa4d7589edc2
https://github.com/scummvm/scummvm/commit/f8c025dbf020fbbe758cb709057baa4d7589edc2
Author: D G Turner (digitall at scummvm.org)
Date: 2022-06-11T22:38:46+01:00
Commit Message:
TINSEL: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings
Changed paths:
engines/tinsel/noir/notebook.cpp
engines/tinsel/noir/notebook.h
engines/tinsel/noir/notebook_page.cpp
diff --git a/engines/tinsel/noir/notebook.cpp b/engines/tinsel/noir/notebook.cpp
index c6789c3ca71..67524b9f258 100644
--- a/engines/tinsel/noir/notebook.cpp
+++ b/engines/tinsel/noir/notebook.cpp
@@ -98,7 +98,7 @@ void Notebook::refresh() {
int Notebook::addTitle(const InventoryObjectT3 &invObject) {
int id = invObject.getId();
assert(invObject.isNotebookTitle());
- for (int i = 0; i < _numPages; i++) {
+ for (uint32 i = 0; i < _numPages; i++) {
if (_pages[i].getTitle() == id) {
return i;
}
@@ -143,7 +143,7 @@ void Notebook::addClue(int id) {
}
int Notebook::getPageWithTitle(int id) {
- for (int i = 0; i < _numPages; i++) {
+ for (uint32 i = 0; i < _numPages; i++) {
if (_pages[i].getTitle() == id) {
return i;
}
@@ -180,7 +180,7 @@ void InitNotebookAnim(OBJECT **obj, ANIM &anim, SysReel reel, int zPosition) {
}
void Notebook::setNextPage(int pageIndex) {
- assert(_prevPage == -1 || _prevPage == _currentPage); // Check that we've cleaned any outstanding page.
+ assert(_prevPage == -1 || _prevPage == (int32)_currentPage); // Check that we've cleaned any outstanding page.
_prevPage = _currentPage;
_currentPage = pageIndex;
}
diff --git a/engines/tinsel/noir/notebook.h b/engines/tinsel/noir/notebook.h
index 799c30d2573..cc74c936f5c 100644
--- a/engines/tinsel/noir/notebook.h
+++ b/engines/tinsel/noir/notebook.h
@@ -99,7 +99,7 @@ private:
HYPERLINK _hyperlinks[MAX_HYPERS];
uint32 _numPages = 1;
- uint32 _prevPage = -1;
+ int32 _prevPage = -1;
uint32 _currentPage = 1;
NotebookPage _pages[MAX_PAGES] = {};
diff --git a/engines/tinsel/noir/notebook_page.cpp b/engines/tinsel/noir/notebook_page.cpp
index 68f19991e6b..3b93bc6edca 100644
--- a/engines/tinsel/noir/notebook_page.cpp
+++ b/engines/tinsel/noir/notebook_page.cpp
@@ -103,7 +103,7 @@ void NotebookPage::handlePointAtLine(int line) {
}
int NotebookPage::indexOfClue(int id) const {
- for (int i = 0; i < _numLines; i++) {
+ for (uint32 i = 0; i < _numLines; i++) {
if (_lines[i]._id == id) {
return i;
}
@@ -140,20 +140,20 @@ int32 NotebookPage::getTitle() const {
}
void NotebookPage::fillIn() {
- for (int i = 0; i < _numLines; i++) {
+ for (uint32 i = 0; i < _numLines; i++) {
_lines[i].fillIn(i);
}
}
void NotebookPage::clear() {
- for (int i = 0; i < _numLines; i++) {
+ for (uint32 i = 0; i < _numLines; i++) {
_lines[i].clear();
}
_pointedClue = -1;
}
int NotebookPage::getClueForLine(int line) const {
- if (line >= _numLines) {
+ if (line >= (int)_numLines) {
return 0;
}
return _lines[line]._id;
More information about the Scummvm-git-logs
mailing list