[Scummvm-git-logs] scummvm master -> 7988c1a23c43eae332b0cd185d0fc55c61aef2fb

criezy criezy at scummvm.org
Wed Mar 31 22:28:49 UTC 2021


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:
7988c1a23c COMMON: Fix compilation of devtools


Commit: 7988c1a23c43eae332b0cd185d0fc55c61aef2fb
    https://github.com/scummvm/scummvm/commit/7988c1a23c43eae332b0cd185d0fc55c61aef2fb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-31T23:28:11+01:00

Commit Message:
COMMON: Fix compilation of devtools

Changed paths:
    common/base-str.cpp


diff --git a/common/base-str.cpp b/common/base-str.cpp
index db61b15548..588410b9b4 100644
--- a/common/base-str.cpp
+++ b/common/base-str.cpp
@@ -181,14 +181,18 @@ TEMPLATE
 void BASESTRING::incRefCount() const {
 	assert(!isStorageIntern());
 	if (_extern._refCount == nullptr) {
+#ifndef SCUMMVM_UTIL
 		lockMemoryPoolMutex();
+#endif
 		if (g_refCountPool == nullptr) {
 			g_refCountPool = new MemoryPool(sizeof(int));
 			assert(g_refCountPool);
 		}
 
 		_extern._refCount = (int *)g_refCountPool->allocChunk();
+#ifndef SCUMMVM_UTIL
 		unlockMemoryPoolMutex();
+#endif
 		*_extern._refCount = 2;
 	} else {
 		++(*_extern._refCount);
@@ -207,10 +211,14 @@ void BASESTRING::decRefCount(int *oldRefCount) {
 		// The ref count reached zero, so we free the string storage
 		// and the ref count storage.
 		if (oldRefCount) {
+#ifndef SCUMMVM_UTIL
 			lockMemoryPoolMutex();
+#endif
 			assert(g_refCountPool);
 			g_refCountPool->freeChunk(oldRefCount);
+#ifndef SCUMMVM_UTIL
 			unlockMemoryPoolMutex();
+#endif
 		}
 		// Coverity thinks that we always free memory, as it assumes
 		// (correctly) that there are cases when oldRefCount == 0




More information about the Scummvm-git-logs mailing list