COMMON: Don't include win32.h in common/encoding.h
This commit is contained in:
parent
e6e70b2042
commit
1c1cc91ad5
2 changed files with 11 additions and 19 deletions
|
@ -27,7 +27,6 @@
|
||||||
#include "backends/platform/sdl/win32/win32-window.h"
|
#include "backends/platform/sdl/win32/win32-window.h"
|
||||||
|
|
||||||
class OSystem_Win32 : public OSystem_SDL {
|
class OSystem_Win32 : public OSystem_SDL {
|
||||||
friend class Common::Encoding;
|
|
||||||
public:
|
public:
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void initBackend();
|
virtual void initBackend();
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include "backends/platform/sdl/win32/win32.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,9 +36,6 @@ namespace Common {
|
||||||
* ScummVM is compiled with or without iconv.
|
* ScummVM is compiled with or without iconv.
|
||||||
*/
|
*/
|
||||||
class Encoding {
|
class Encoding {
|
||||||
#ifdef WIN32
|
|
||||||
friend char *OSystem_Win32::convertEncoding(const char*, const char *, const char *, size_t);
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Constructs everything needed for the conversion between 2 encodings
|
* Constructs everything needed for the conversion between 2 encodings
|
||||||
|
@ -105,6 +98,17 @@ class Encoding {
|
||||||
*/
|
*/
|
||||||
void setTo(const String &to) {_to = 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:
|
private:
|
||||||
/** The encoding, which is currently being converted to */
|
/** The encoding, which is currently being converted to */
|
||||||
String _to;
|
String _to;
|
||||||
|
@ -211,17 +215,6 @@ class Encoding {
|
||||||
* @return Transliterated string in UTF-32 (must be freed) or nullptr on fail.
|
* @return Transliterated string in UTF-32 (must be freed) or nullptr on fail.
|
||||||
*/
|
*/
|
||||||
static uint32 *transliterateUTF32(const uint32 *string, size_t length);
|
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);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue