[Scummvm-git-logs] scummvm master -> 1c1cc91ad5ae2e67a33d7c7ae896f74153477ec5

bluegr bluegr at gmail.com
Mon Sep 2 07:01:21 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:
1c1cc91ad5 COMMON: Don't include win32.h in common/encoding.h


Commit: 1c1cc91ad5ae2e67a33d7c7ae896f74153477ec5
    https://github.com/scummvm/scummvm/commit/1c1cc91ad5ae2e67a33d7c7ae896f74153477ec5
Author: SupSuper (supsuper at gmail.com)
Date: 2019-09-02T08:01:18+03:00

Commit Message:
COMMON: Don't include win32.h in common/encoding.h

Changed paths:
    backends/platform/sdl/win32/win32.h
    common/encoding.h


diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h
index 1c24285..2a496f5 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -27,7 +27,6 @@
 #include "backends/platform/sdl/win32/win32-window.h"
 
 class OSystem_Win32 : public OSystem_SDL {
-	friend class Common::Encoding;
 public:
 	virtual void init();
 	virtual void initBackend();
diff --git a/common/encoding.h b/common/encoding.h
index 8a77c81..2b079ad 100644
--- a/common/encoding.h
+++ b/common/encoding.h
@@ -28,10 +28,6 @@
 #include "common/system.h"
 
 
-#ifdef WIN32
-#include "backends/platform/sdl/win32/win32.h"
-#endif
-
 namespace Common {
 
 /**
@@ -40,9 +36,6 @@ namespace Common {
  * ScummVM is compiled with or without iconv.
  */
 class Encoding {
-#ifdef WIN32
-	friend char *OSystem_Win32::convertEncoding(const char*, const char *, const char *, size_t);
-#endif
 	public:
 		/**
 		 * Constructs everything needed for the conversion between 2 encodings
@@ -104,6 +97,17 @@ class Encoding {
 		 * @param to The encoding, to convert to
 		 */
 		void setTo(const String &to) {_to = to;};
+
+		/**
+		 * Switches the endianity of a string.
+		 *
+		 * @param string Array containing the characters of a string.
+		 * @param length Length of the string in bytes
+		 * @param bitCount Number of bits used for each character.
+		 *
+		 * @return Array of characters with the opposite endianity
+		 */
+		static char *switchEndian(const char *string, int length, int bitCount);
 	
 	private:
 		/** The encoding, which is currently being converted to */
@@ -211,17 +215,6 @@ class Encoding {
 		 * @return Transliterated string in UTF-32 (must be freed) or nullptr on fail.
 		 */
 		static uint32 *transliterateUTF32(const uint32 *string, size_t length);
-
-		/**
-		 * Switches the endianity of a string.
-		 *
-		 * @param string Array containing the characters of a string.
-		 * @param length Length of the string in bytes
-		 * @param bitCount Number of bits used for each character.
-		 *
-		 * @return Array of characters with the opposite endianity
-		 */
-		static char *switchEndian(const char *string, int length, int bitCount);
 };
 
 }





More information about the Scummvm-git-logs mailing list