Commit c5b9acae authored by D-AIRY's avatar D-AIRY

Fixed some warnings

parent e4a52e5c
......@@ -78,9 +78,9 @@ namespace gui
point a[] = {
{0, 0, 0, 0.0f, 0.0f},
{m_iWidth, 0, 0, 1.0f, 0.0f},
{m_iWidth, m_iHeight, 0, 1.0f, 1.0f},
{0, m_iHeight, 0, 0.0f, 1.0f}
{(float)m_iWidth, 0, 0, 1.0f, 0.0f},
{(float)m_iWidth, (float)m_iHeight, 0, 1.0f, 1.0f},
{0, (float)m_iHeight, 0, 0.0f, 1.0f}
};
m_pVertices = GetGUI()->getDevice()->createVertexBuffer(sizeof(point) * 4, GXBUFFER_USAGE_STATIC, a);
......
......@@ -241,7 +241,7 @@ namespace gui
UINT d = 0, o = 0;
WCHAR cn;
StringW prm = str.substr(pos + 1);
UINT c = swscanf_s(prm.c_str(), L"%d%c-%d", &d, &cn, sizeof(cn), &o);
UINT c = swscanf_s(prm.c_str(), L"%d%c-%d", &d, &cn, 1, &o);
if(c >= 1)
{
nth_num = d;
......@@ -3599,7 +3599,7 @@ namespace gui
}
}
int n = swscanf_s(_val.c_str(), L"%f%c%c", &p, &a, sizeof(a), &b, sizeof(b));
int n = swscanf_s(_val.c_str(), L"%f%c%c", &p, &a, 1, &b, 1);
clr->set(p);
if(n == 1)
{
......
......@@ -1749,16 +1749,16 @@ namespace gui
};
point a[6] = {
{0, 0, 0, rc},
{m_iWidth, 0, 0, rc},
{0, (float)(m_iHeight), 0, rc},
{0, (float)(m_iHeight), 0, rc},
{m_iWidth, 0, 0, rc},
{m_iWidth, (float)(m_iHeight), 0, rc}
{(float)m_iWidth, 0, 0, rc},
{0, (float)m_iHeight, 0, rc},
{0, (float)m_iHeight, 0, rc},
{(float)m_iWidth, 0, 0, rc},
{(float)m_iWidth, (float)(m_iHeight), 0, rc}
};
point2 apdx8[] = {
{0, 0, 0},
{m_iWidth, 0, 0},
{m_iWidth, (float)(m_iHeight), 0},
{(float)m_iWidth, 0, 0},
{(float)m_iWidth, (float)(m_iHeight), 0},
{0, (float)(m_iHeight), 0}
};
......
......@@ -670,7 +670,7 @@ void CShadowPSSM::updateFrustums()
m_pCamera->getUp(&vUp);
float fAspectRatio = (float)*r_win_width / (float)*r_win_height;
float fFovTan = tanf(*r_effective_fov * 0.5f);
for(UINT i = 0; i < *r_pssm_splits; ++i)
for(int i = 0; i < *r_pssm_splits; ++i)
{
Split &split = m_splits[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment