[Scummvm-git-logs] scummvm master -> 3a7219fa57c671822e4b61ddc3217b9acbeae848

bluegr bluegr at gmail.com
Sun Jun 30 20:44:01 CEST 2019


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:
3a7219fa57 JANITORIAL: Avoid C4121 warnings in MSVC by reordering fields


Commit: 3a7219fa57c671822e4b61ddc3217b9acbeae848
    https://github.com/scummvm/scummvm/commit/3a7219fa57c671822e4b61ddc3217b9acbeae848
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2019-06-30T21:43:58+03:00

Commit Message:
JANITORIAL: Avoid C4121 warnings in MSVC by reordering fields

C4121 is about 'symbol': alignment of a member was sensitive to packing

Changed paths:
    common/hashmap.h
    graphics/VectorRenderer.h


diff --git a/common/hashmap.h b/common/hashmap.h
index 7913d8f..0021841 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -88,8 +88,8 @@ private:
 	typedef HashMap<Key, Val, HashFunc, EqualFunc> HM_t;
 
 	struct Node {
-		const Key _key;
 		Val _value;
+		const Key _key;
 		explicit Node(const Key &key) : _key(key), _value() {}
 		Node() : _key(), _value() {}
 	};
@@ -113,6 +113,9 @@ private:
 	ObjectPool<Node, HASHMAP_MEMORYPOOL_SIZE> _nodePool;
 #endif
 
+	/** Default value, returned by the const getVal. */
+	const Val _defaultVal;
+
 	Node **_storage;	///< hashtable of size arrsize.
 	size_type _mask;		///< Capacity of the HashMap minus one; must be a power of two of minus one
 	size_type _size;
@@ -121,9 +124,6 @@ private:
 	HashFunc _hash;
 	EqualFunc _equal;
 
-	/** Default value, returned by the const getVal. */
-	const Val _defaultVal;
-
 	/** Dummy node, used as marker for erased objects. */
 	#define HASHMAP_DUMMY_NODE	((Node *)1)
 
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 2abe0e0..7863820 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -43,6 +43,10 @@ typedef void (VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, co
 
 
 struct DrawStep {
+	DrawingFunctionCallback drawingCall; /**< Pointer to drawing function */
+	Graphics::Surface* blitSrc;
+	Graphics::TransparentSurface* blitAlphaSrc;
+
 	struct Color {
 		uint8 r, g, b;
 		bool set;
@@ -81,10 +85,6 @@ struct DrawStep {
 	uint32 scale; /**< scale of all the coordinates in FIXED POINT with 16 bits mantissa */
 
 	GUI::ThemeEngine::AutoScaleMode autoscale; /**< scale alphaimage if present */
-
-	DrawingFunctionCallback drawingCall; /**< Pointer to drawing function */
-	Graphics::Surface *blitSrc;
-	Graphics::TransparentSurface *blitAlphaSrc;
 };
 
 VectorRenderer *createRenderer(int mode);





More information about the Scummvm-git-logs mailing list