[Scummvm-git-logs] scummvm master -> a768e0afb0e2f6cc32f718ef542f9f4226a1df97

mduggan mgithub at guarana.org
Sun Apr 5 05:11:44 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
08abb8f7af ULTIMA8: Small const correctness fixes for ECode
a768e0afb0 ULTIMA8: Sanity asserts in Process::waitFor


Commit: 08abb8f7af116e1567b9443af8648c2e6653e89b
    https://github.com/scummvm/scummvm/commit/08abb8f7af116e1567b9443af8648c2e6653e89b
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-04-05T14:06:32+09:00

Commit Message:
ULTIMA8: Small const correctness fixes for ECode

Changed paths:
    engines/ultima/ultima8/misc/errors.h


diff --git a/engines/ultima/ultima8/misc/errors.h b/engines/ultima/ultima8/misc/errors.h
index ed155b364a..266a7fc201 100644
--- a/engines/ultima/ultima8/misc/errors.h
+++ b/engines/ultima/ultima8/misc/errors.h
@@ -46,25 +46,25 @@ struct ECode {
 		return _error == 0;
 	}
 
-	ECode &operator = (int32 &_e) {
+	ECode &operator = (const int32 &_e) {
 		_error = _e;
 		return (*this);
 	}
 
-	ECode &operator = (ECode &_e) {
+	ECode &operator = (const ECode &_e) {
 		_error = _e._error;
 		return (*this);
 	}
 
-	bool operator != (int32 &_e) {
+	bool operator != (const int32 &_e) const {
 		return _error != _e;
 	}
 
-	friend bool operator != (int32 &_e, ECode &_e2) {
+	friend bool operator != (const int32 &_e, const ECode &_e2) {
 		return _e2._error != _e;
 	}
 
-	bool operator == (int32 &_e) {
+	bool operator == (const int32 &_e) const {
 		return _error == _e;
 	}
 


Commit: a768e0afb0e2f6cc32f718ef542f9f4226a1df97
    https://github.com/scummvm/scummvm/commit/a768e0afb0e2f6cc32f718ef542f9f4226a1df97
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-04-05T14:10:18+09:00

Commit Message:
ULTIMA8: Sanity asserts in Process::waitFor

Changed paths:
    engines/ultima/ultima8/kernel/process.cpp


diff --git a/engines/ultima/ultima8/kernel/process.cpp b/engines/ultima/ultima8/kernel/process.cpp
index 4e90f3a4f4..03ebe33890 100644
--- a/engines/ultima/ultima8/kernel/process.cpp
+++ b/engines/ultima/ultima8/kernel/process.cpp
@@ -74,6 +74,7 @@ void Process::wakeUp(uint32 result_) {
 }
 
 void Process::waitFor(ProcId pid_) {
+	assert(pid_ != _pid);
 	if (pid_) {
 		Kernel *kernel = Kernel::get_instance();
 
@@ -87,6 +88,7 @@ void Process::waitFor(ProcId pid_) {
 }
 
 void Process::waitFor(Process *proc) {
+	assert(this != proc);
 	ProcId pid_ = 0;
 	if (proc) pid_ = proc->getPid();
 




More information about the Scummvm-git-logs mailing list