wchar_t:wstring::char:string; fixes warning

This commit is contained in:
Glenn Maynard
2004-11-30 01:39:22 +00:00
parent 03e22da030
commit b144644c7b
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
{
bool nextChar = false;
int toAdd = VIRTUALKB.Translate(DeviceI, MenuI, m_sAnswer, &nextChar);
wchar_t toAdd = VIRTUALKB.Translate(DeviceI, MenuI, m_sAnswer, &nextChar);
if( toAdd != 0 && toAdd != KEY_BACK && toAdd != KEY_ESC && toAdd != KEY_ENTER )
{
+3 -3
View File
@@ -24,7 +24,7 @@ void VirtualKeyboard::Reset( VirtualKeyboardMode mode )
currentMode = mode;
}
int VirtualKeyboard::Translate( const DeviceInput& DeviceI, const MenuInput &MenuI, const wstring &cur_string, bool *nextChar )
wchar_t VirtualKeyboard::Translate( const DeviceInput& DeviceI, const MenuInput &MenuI, const wstring &cur_string, bool *nextChar )
{
*nextChar = false;
MenuButton button = MenuI.button;
@@ -48,7 +48,7 @@ int VirtualKeyboard::Translate( const DeviceInput& DeviceI, const MenuInput &Men
}
else
{
int c = cur_string[cur_string.size() - 1];
wchar_t c = cur_string[cur_string.size() - 1];
if(c == ' ')
c = 'a';
@@ -85,7 +85,7 @@ int VirtualKeyboard::Translate( const DeviceInput& DeviceI, const MenuInput &Men
}
else
{
int c = cur_string[cur_string.size() - 1];
wchar_t c = cur_string[cur_string.size() - 1];
if(c == ' ')
c = '~';
+1 -1
View File
@@ -15,7 +15,7 @@ public:
~VirtualKeyboard();
void Reset( VirtualKeyboardMode mode );
int Translate( const DeviceInput& DeviceI, const MenuInput &MenuI, const wstring &cur_string, bool *nextChar );
wchar_t Translate( const DeviceInput& DeviceI, const MenuInput &MenuI, const wstring &cur_string, bool *nextChar );
protected:
VirtualKeyboardMode currentMode;