mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 02:56:28 +03:00
GCC8 warnings fixes.
--HG-- branch : dev
This commit is contained in:
@@ -90,7 +90,10 @@ void BatchRenderer::addVertexs( const unsigned int& num ) {
|
||||
|
||||
if ( ( mNumVertex + num ) >= mVertexSize ) {
|
||||
eeVertex * newVertex = eeNewArray( eeVertex, mVertexSize * 2 );
|
||||
memcpy( &mVertex[0], &newVertex[0], mVertexSize * sizeof(eeVertex) );
|
||||
|
||||
for ( Uint32 i = 0; i < mVertexSize; i++ )
|
||||
newVertex[i] = mVertex[i];
|
||||
|
||||
eeSAFE_DELETE_ARRAY( mVertex );
|
||||
mVertex = newVertex;
|
||||
mVertexSize = mVertexSize * 2;
|
||||
|
||||
@@ -607,7 +607,7 @@ const Uint8* Image::getPixelsPtr() {
|
||||
Color Image::getPixel( const unsigned int& x, const unsigned int& y ) {
|
||||
eeASSERT( !( mPixels == NULL || x > mWidth || y > mHeight ) );
|
||||
Color dst;
|
||||
memcpy( &dst, &mPixels[ ( ( x + y * mWidth ) * mChannels ) ], mChannels );
|
||||
memcpy( (void*)&dst, &mPixels[ ( ( x + y * mWidth ) * mChannels ) ], mChannels );
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
@@ -867,7 +867,6 @@ void Text::setFillColor( const Color& color, Uint32 from, Uint32 to ) {
|
||||
Int32 rpos = from;
|
||||
Int32 lpos = 0;
|
||||
Uint32 i;
|
||||
Uint32 qsize = sizeof(Color) * GLi->quadVertexs();
|
||||
String::StringBaseType curChar;
|
||||
|
||||
// Spaces, new lines and tabs are not rendered, and not counted as a color
|
||||
@@ -902,20 +901,22 @@ void Text::setFillColor( const Color& color, Uint32 from, Uint32 to ) {
|
||||
rpos--;
|
||||
|
||||
if ( '\n' == curChar) {
|
||||
if ( underlined ) {
|
||||
memcpy( &(mColors[ rpos * GLi->quadVertexs() ]), &colors[0], qsize );
|
||||
rpos++;
|
||||
if ( underlined || strikeThrough ) {
|
||||
for ( int i = 0; i < GLi->quadVertexs(); i++ )
|
||||
mColors[ rpos * GLi->quadVertexs() + i ] = colors[i];
|
||||
}
|
||||
|
||||
if ( strikeThrough ) {
|
||||
memcpy( &(mColors[ rpos * GLi->quadVertexs() ]), &colors[0], qsize );
|
||||
if ( underlined )
|
||||
rpos++;
|
||||
|
||||
if ( strikeThrough )
|
||||
rpos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memcpy( &(mColors[ lpos * GLi->quadVertexs() ]), &colors[0], qsize );
|
||||
for ( int i = 0; i < GLi->quadVertexs(); i++ )
|
||||
mColors[ lpos * GLi->quadVertexs() + i ] = colors[i];
|
||||
}
|
||||
|
||||
if ( rto == s ) {
|
||||
@@ -923,16 +924,20 @@ void Text::setFillColor( const Color& color, Uint32 from, Uint32 to ) {
|
||||
lpos++;
|
||||
Uint32 pos = lpos * GLi->quadVertexs();
|
||||
|
||||
if ( pos < mColors.size() )
|
||||
memcpy( &(mColors[ lpos * GLi->quadVertexs() ]), &colors[0], qsize );
|
||||
if ( pos < mColors.size() ) {
|
||||
for ( int i = 0; i < GLi->quadVertexs(); i++ )
|
||||
mColors[ lpos * GLi->quadVertexs() + i ] = colors[i];
|
||||
}
|
||||
}
|
||||
|
||||
if ( strikeThrough ) {
|
||||
lpos++;
|
||||
Uint32 pos = lpos * GLi->quadVertexs();
|
||||
|
||||
if ( pos < mColors.size() )
|
||||
memcpy( &(mColors[ lpos * GLi->quadVertexs() ]), &colors[0], qsize );
|
||||
if ( pos < mColors.size() ) {
|
||||
for ( int i = 0; i < GLi->quadVertexs(); i++ )
|
||||
mColors[ lpos * GLi->quadVertexs() + i ] = colors[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,8 @@ UISkinComplex * UISkinComplex::clone( const std::string& NewName, const bool& Co
|
||||
if ( CopyColorsState ) {
|
||||
SkinC->mColorDefault = mColorDefault;
|
||||
|
||||
memcpy( &SkinC->mColor[0], &mColor[0], UISkinState::StateCount * sizeof(Color) );
|
||||
for ( size_t i = 0; i < UISkinState::StateCount; i++ )
|
||||
SkinC->mColor[i] = mColor[i];
|
||||
}
|
||||
|
||||
memcpy( &SkinC->mDrawable[0], &mDrawable[0], UISkinState::StateCount * SideCount * sizeof(Drawable*) );
|
||||
|
||||
@@ -62,7 +62,8 @@ UISkinSimple * UISkinSimple::clone( const std::string& NewName, const bool& Copy
|
||||
if ( CopyColorsState ) {
|
||||
SkinS->mColorDefault = mColorDefault;
|
||||
|
||||
memcpy( &SkinS->mColor[0], &mColor[0], UISkinState::StateCount * sizeof(Color) );
|
||||
for ( size_t i = 0; i < UISkinState::StateCount; i++ )
|
||||
SkinS->mColor[i] = mColor[i];
|
||||
}
|
||||
|
||||
memcpy( &SkinS->mDrawable[0], &mDrawable[0], UISkinState::StateCount * sizeof(Drawable*) );
|
||||
|
||||
Reference in New Issue
Block a user