Fixed VS2013 warnings.

This commit is contained in:
Branimir Karadžić 2015-03-11 22:45:34 -07:00
parent 441e674459
commit b8f2b24a82
2 changed files with 12 additions and 10 deletions

View file

@ -5618,8 +5618,8 @@ bool ImGui::InputText(const char* label, char* buf, size_t buf_size, ImGuiInputT
// From the moment we focused we are ignoring the content of 'buf'
ImFormatString(edit_state.InitialText, IM_ARRAYSIZE(edit_state.InitialText), "%s", buf);
const char* buf_end = NULL;
edit_state.CurLenW = ImTextStrFromUtf8(edit_state.Text, IM_ARRAYSIZE(edit_state.Text), buf, NULL, &buf_end);
edit_state.CurLenA = buf_end - buf; // We can't get the result from ImFormatString() above because it is not UTF-8 aware. Here we'll cut off malformed UTF-8.
edit_state.CurLenW = (int)ImTextStrFromUtf8(edit_state.Text, IM_ARRAYSIZE(edit_state.Text), buf, NULL, &buf_end);
edit_state.CurLenA = (int)(buf_end - buf); // We can't get the result from ImFormatString() above because it is not UTF-8 aware. Here we'll cut off malformed UTF-8.
edit_state.Width = w;
edit_state.InputCursorScreenPos = ImVec2(-1.f,-1.f);
edit_state.CursorAnimReset();

View file

@ -60,15 +60,17 @@ namespace entry
switch (_key)
{
case Key::Esc: { return 0x1b; } break;
case Key::Return: { return 0x0d; } break;
case Key::Tab: { return 0x09; } break;
case Key::Space: { return 0xa0; } break;
case Key::Backspace: { return 0x08; } break;
case Key::Plus: { return 0x2b; } break;
case Key::Minus: { return 0x2d; } break;
default: { return '\0'; } break;
case Key::Esc: return 0x1b;
case Key::Return: return 0x0d;
case Key::Tab: return 0x09;
case Key::Space: return (char)0xa0;
case Key::Backspace: return 0x08;
case Key::Plus: return 0x2b;
case Key::Minus: return 0x2d;
default: break;
}
return '\0';
}
bool setOrToggle(uint32_t& _flags, const char* _name, uint32_t _bit, int _first, int _argc, char const* const* _argv)