aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/Base/BGame.cpp4
-rw-r--r--engines/wintermute/Base/BRenderer.cpp6
-rw-r--r--engines/wintermute/Base/BStringTable.cpp2
-rw-r--r--engines/wintermute/UI/UIEdit.cpp6
4 files changed, 9 insertions, 9 deletions
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 994dd48b2c..625c154d7d 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -1518,7 +1518,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS
const char *Key = Stack->Pop()->GetString();
const char *InitVal = Stack->Pop()->GetString();
AnsiString val = _registry->ReadString("PrivateSettings", Key, InitVal);
- Stack->PushString((char *)val.c_str());
+ Stack->PushString(val.c_str());
return S_OK;
}
@@ -2489,7 +2489,7 @@ CScValue *CBGame::scGetProperty(const char *Name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SaveDirectory") == 0) {
AnsiString dataDir = GetDataDir();
- _scValue->SetString((char *)dataDir.c_str());
+ _scValue->SetString(dataDir.c_str());
return _scValue;
}
diff --git a/engines/wintermute/Base/BRenderer.cpp b/engines/wintermute/Base/BRenderer.cpp
index 3a58cdefb4..690f16016c 100644
--- a/engines/wintermute/Base/BRenderer.cpp
+++ b/engines/wintermute/Base/BRenderer.cpp
@@ -38,9 +38,9 @@ namespace WinterMute {
//////////////////////////////////////////////////////////////////////
CBRenderer::CBRenderer(CBGame *inGame): CBBase(inGame) {
- _instance = NULL;
- _window = NULL;
- _clipperWindow = NULL;
+ _instance = 0;
+ _window = 0;
+ _clipperWindow = 0;
_active = false;
_ready = false;
_windowed = true;
diff --git a/engines/wintermute/Base/BStringTable.cpp b/engines/wintermute/Base/BStringTable.cpp
index f494658906..2136bc4d94 100644
--- a/engines/wintermute/Base/BStringTable.cpp
+++ b/engines/wintermute/Base/BStringTable.cpp
@@ -73,7 +73,7 @@ HRESULT CBStringTable::AddString(const char *Key, const char *Val, bool ReportDu
char *CBStringTable::GetKey(const char *Str) {
if (Str == NULL || Str[0] != '/') return NULL;
- char *value = strchr((char *)Str + 1, '/');
+ const char *value = strchr(Str + 1, '/');
if (value == NULL) return NULL;
char *key = new char[value - Str];
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp
index 928d04016a..e2d5c1f01e 100644
--- a/engines/wintermute/UI/UIEdit.cpp
+++ b/engines/wintermute/UI/UIEdit.cpp
@@ -581,7 +581,7 @@ HRESULT CUIEdit::display(int OffsetX, int OffsetY) {
if (_selStart >= _selEnd) {
while (font->GetTextWidth((byte *)_text + _scrollOffset, MAX(0, _selEnd - _scrollOffset)) > _width - CursorWidth - 2 * _frameWidth) {
_scrollOffset++;
- if (_scrollOffset >= strlen(_text)) break;
+ if (_scrollOffset >= (int)strlen(_text)) break;
}
_scrollOffset = MIN(_scrollOffset, _selEnd);
@@ -595,7 +595,7 @@ HRESULT CUIEdit::display(int OffsetX, int OffsetY) {
> _width - CursorWidth - 2 * _frameWidth) {
_scrollOffset++;
- if (_scrollOffset >= strlen(_text)) break;
+ if (_scrollOffset >= (int)strlen(_text)) break;
}
_scrollOffset = MIN(_scrollOffset, _selEnd);
@@ -811,7 +811,7 @@ int CUIEdit::DeleteChars(int Start, int End) {
//////////////////////////////////////////////////////////////////////////
int CUIEdit::InsertChars(int Pos, byte *Chars, int Num) {
- if (strlen(_text) + Num > _maxLength) {
+ if ((int)strlen(_text) + Num > _maxLength) {
Num -= (strlen(_text) + Num - _maxLength);
}