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

dreammaster dreammaster at scummvm.org
Sun Feb 7 01:17:01 UTC 2021


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:
53656e0338 COMMON: Wrap ptr initializers using nullptr_t in USE_CXX11
d31a614b08 AGS: Compilation fixes


Commit: 53656e033854aa06cae99704857768f99f6fa4c6
    https://github.com/scummvm/scummvm/commit/53656e033854aa06cae99704857768f99f6fa4c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-06T17:11:07-08:00

Commit Message:
COMMON: Wrap ptr initializers using nullptr_t in USE_CXX11

Changed paths:
    common/ptr.h


diff --git a/common/ptr.h b/common/ptr.h
index 80173268da..35f326de69 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -85,8 +85,10 @@ public:
 	BasePtr() : _refCount(nullptr), _deletion(nullptr), _pointer(nullptr) {
 	}
 
+#ifdef USE_CXX11
 	explicit BasePtr(nullptr_t) : _refCount(nullptr), _deletion(nullptr), _pointer(nullptr) {
 	}
+#endif
 
 	template<class T2>
 	explicit BasePtr(T2 *p) : _refCount(new RefValue(1)), _deletion(new BasePtrDeletionImpl<T2>(p)), _pointer(p) {
@@ -280,8 +282,10 @@ public:
 	SharedPtr() : BasePtr<T>() {
 	}
 
+#ifdef USE_CXX11
 	SharedPtr(nullptr_t) : BasePtr<T>() {
 	}
+#endif
 
 	template<class T2>
 	explicit SharedPtr(T2 *p) : BasePtr<T>(p) {
@@ -333,8 +337,10 @@ public:
 	WeakPtr() : BasePtr<T>() {
 	}
 
+#ifdef USE_CXX11
 	WeakPtr(nullptr_t) : BasePtr<T>() {
 	}
+#endif
 
 	template<class T2>
 	explicit WeakPtr(T2 *p) : BasePtr<T>(p) {


Commit: d31a614b08a379ea544f38a68ebd414ece1aef48
    https://github.com/scummvm/scummvm/commit/d31a614b08a379ea544f38a68ebd414ece1aef48
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-06T17:11:07-08:00

Commit Message:
AGS: Compilation fixes

Changed paths:
    engines/ags/engine/media/audio/sound.cpp
    engines/ags/engine/script/cc_instance.cpp
    engines/ags/engine/script/script.cpp


diff --git a/engines/ags/engine/media/audio/sound.cpp b/engines/ags/engine/media/audio/sound.cpp
index 5051321ee1..f621e2a98e 100644
--- a/engines/ags/engine/media/audio/sound.cpp
+++ b/engines/ags/engine/media/audio/sound.cpp
@@ -80,6 +80,7 @@ SOUNDCLIP *my_load_mp3(const AssetPath &asset_name, int voll) {
 }
 
 SOUNDCLIP *my_load_static_ogg(const AssetPath &asset_name, int voll, bool loop) {
+#ifdef USE_VORBIS
 	Common::SeekableReadStream *data = get_cached_sound(asset_name);
 	if (data) {
 		Audio::AudioStream *audioStream = Audio::makeVorbisStream(data, DisposeAfterUse::YES);
@@ -87,6 +88,9 @@ SOUNDCLIP *my_load_static_ogg(const AssetPath &asset_name, int voll, bool loop)
 	} else {
 		return nullptr;
 	}
+#else
+	return nullptr;
+#endif
 }
 
 SOUNDCLIP *my_load_ogg(const AssetPath &asset_name, int voll) {
diff --git a/engines/ags/engine/script/cc_instance.cpp b/engines/ags/engine/script/cc_instance.cpp
index 53ea6aa4f7..b9ba305bfa 100644
--- a/engines/ags/engine/script/cc_instance.cpp
+++ b/engines/ags/engine/script/cc_instance.cpp
@@ -1070,6 +1070,7 @@ int ccInstance::Run(int32_t curpc) {
 			case kScValStackPtr:
 				registers[SREG_OP] = reg1;
 				break;
+
 			case kScValStaticArray:
 				if (reg1.StcArr->GetDynamicManager()) {
 					registers[SREG_OP].SetDynamicObject(
@@ -1077,7 +1078,8 @@ int ccInstance::Run(int32_t curpc) {
 					    reg1.StcArr->GetDynamicManager());
 					break;
 				}
-			// fall-through intended
+				// fall through
+
 			default:
 				cc_error("internal error: SCMD_CALLOBJ argument is not an object of built-in or user-defined type");
 				return -1;
diff --git a/engines/ags/engine/script/script.cpp b/engines/ags/engine/script/script.cpp
index 999d250427..aef7b4e188 100644
--- a/engines/ags/engine/script/script.cpp
+++ b/engines/ags/engine/script/script.cpp
@@ -695,7 +695,9 @@ int run_interaction_commandlist(InteractionCommandList *nicl, int *timesrun, int
 		case 2:  // Add score (first time)
 			if (timesrun[0] > 0)
 				break;
-			timesrun[0] ++;
+			timesrun[0]++;
+			// fall through
+
 		case 3:  // Add score
 			GiveScore(IPARAM1);
 			break;




More information about the Scummvm-git-logs mailing list