Core, ide: Fixed some warnings

This commit is contained in:
Mirek Fidler 2022-03-06 15:26:36 +01:00
parent db231a2d4a
commit 3b08038375
3 changed files with 1 additions and 5 deletions

View file

@ -645,7 +645,6 @@ String GetUserName()
::GetUserNameW(temp, &w);
return temp;
#else
char temp[256];
return Nvl(GetEnv("USER"), "root");
#endif
}

View file

@ -260,10 +260,8 @@ WString::WString(const std::wstring& s)
std::wstring WString::ToStd() const
{
if(sizeof(wchar_t) == 4) {
const wchar *s = begin();
if(sizeof(wchar_t) == 4)
return std::wstring((const wchar_t *)begin(), GetCount());
}
if(sizeof(wchar_t) == 2) {
Vector<char16> h = ToUtf16(*this);
return std::wstring((const wchar_t *)h.begin(), h.GetCount());

View file

@ -376,7 +376,6 @@ void TextCompareCtrl::Paint(Draw& draw)
int x = 0;
int ii = 0;
while(ii < hln.GetCount() - 1) {
Font fnt = font;
LineEdit::Highlight& h = hln[ii];
int l = 1;
while(ii + l < hln.GetCount() - 1 && hln[ii + l].paper == h.paper)