Commit adc89d1c authored by cutealien's avatar cutealien

Merge branch releases/1.8 revisions 5195:5252 into trunk

- Get rid of some "misleading-indentation" warnings in gcc6
- Fix some compile warnings in aes which got handled as errors by some c++11 compilers.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5253 dfc29bdd-3216-0410-991c-e03cc46cb475
parent bd9fe040
......@@ -133,6 +133,8 @@ Changes in 1.9 (not yet released)
--------------------------
Changes in 1.8.4
- Fix some compile warnings in aes which got handled as errors by some c++11 compilers.
- Get rid of some misleading-indentation warnings in gcc6
- Fix serialization of the InputReceiverEnabled flag in CCameraSceneNode
- Fix pasting text from X11 applications to Irrlicht. Thanks @est31 for the patch.
- Tests give now a warning when stabilizing screenshots failed. Aslo trying more often now (a hack as taking screenshots otherwise fails often in windowed mode on some systems).
......
......@@ -129,8 +129,8 @@ void CGUIContextMenu::setSubMenu(u32 index, CGUIContextMenu* menu)
if (index >= Items.size())
return;
if (menu)
menu->grab();
if (menu)
menu->grab();
if (Items[index].SubMenu)
Items[index].SubMenu->drop();
......
......@@ -611,8 +611,8 @@ u32 CGUIListBox::addItem(const wchar_t* text, s32 icon)
void CGUIListBox::setSpriteBank(IGUISpriteBank* bank)
{
if ( bank == IconBank )
return;
if ( bank == IconBank )
return;
if (IconBank)
IconBank->drop();
......
......@@ -40,8 +40,8 @@ CGUIMeshViewer::~CGUIMeshViewer()
//! sets the mesh to be shown
void CGUIMeshViewer::setMesh(scene::IAnimatedMesh* mesh)
{
if (mesh)
mesh->grab();
if (mesh)
mesh->grab();
if (Mesh)
Mesh->drop();
......
......@@ -1083,8 +1083,8 @@ void CGUITreeView::setIconFont( IGUIFont* font )
{
s32 height;
if ( font )
font->grab();
if ( font )
font->grab();
if ( IconFont )
{
IconFont->drop();
......@@ -1105,8 +1105,8 @@ void CGUITreeView::setIconFont( IGUIFont* font )
//! The default is 0 (no images).
void CGUITreeView::setImageList( IGUIImageList* imageList )
{
if (imageList )
imageList->grab();
if (imageList )
imageList->grab();
if( ImageList )
{
ImageList->drop();
......
......@@ -333,8 +333,8 @@ IRandomizer* CIrrDeviceStub::createDefaultRandomizer() const
//! Sets the input receiving scene manager.
void CIrrDeviceStub::setInputReceivingSceneManager(scene::ISceneManager* sceneManager)
{
if (sceneManager)
sceneManager->grab();
if (sceneManager)
sceneManager->grab();
if (InputReceivingSceneManager)
InputReceivingSceneManager->drop();
......
......@@ -705,16 +705,28 @@ namespace video
//! normal map lookup 32 bit version
inline f32 nml32(int x, int y, int pitch, int height, s32 *p) const
{
if (x < 0) x = pitch-1; if (x >= pitch) x = 0;
if (y < 0) y = height-1; if (y >= height) y = 0;
if (x < 0)
x = pitch-1;
if (x >= pitch)
x = 0;
if (y < 0)
y = height-1;
if (y >= height)
y = 0;
return (f32)(((p[(y * pitch) + x])>>16) & 0xff);
}
//! normal map lookup 16 bit version
inline f32 nml16(int x, int y, int pitch, int height, s16 *p) const
{
if (x < 0) x = pitch-1; if (x >= pitch) x = 0;
if (y < 0) y = height-1; if (y >= height) y = 0;
if (x < 0)
x = pitch-1;
if (x >= pitch)
x = 0;
if (y < 0)
y = height-1;
if (y >= height)
y = 0;
return (f32) getAverage ( p[(y * pitch) + x] );
}
......
......@@ -72,8 +72,8 @@ IParticleEmitter* CParticleSystemSceneNode::getEmitter()
//! Sets the particle emitter, which creates the particles.
void CParticleSystemSceneNode::setEmitter(IParticleEmitter* emitter)
{
if (emitter == Emitter)
return;
if (emitter == Emitter)
return;
if (Emitter)
Emitter->drop();
......
......@@ -368,8 +368,10 @@ aes_rval aes_decrypt_key192(const void *in_key, aes_decrypt_ctx cx[1])
#endif
}
#else
cx->ks[4] = ff(ss[4] = word_in(in_key, 4));
cx->ks[5] = ff(ss[5] = word_in(in_key, 5));
ss[4] = word_in(in_key, 4);
cx->ks[4] = ff(ss[4]);
ss[5] = word_in(in_key, 5);
cx->ks[5] = ff(ss[5]);
kdf6(cx->ks, 0); kd6(cx->ks, 1);
kd6(cx->ks, 2); kd6(cx->ks, 3);
kd6(cx->ks, 4); kd6(cx->ks, 5);
......@@ -414,10 +416,14 @@ aes_rval aes_decrypt_key256(const void *in_key, aes_decrypt_ctx cx[1])
#endif
}
#else
cx->ks[4] = ff(ss[4] = word_in(in_key, 4));
cx->ks[5] = ff(ss[5] = word_in(in_key, 5));
cx->ks[6] = ff(ss[6] = word_in(in_key, 6));
cx->ks[7] = ff(ss[7] = word_in(in_key, 7));
ss[4] = word_in(in_key, 4);
cx->ks[4] = ff(ss[4]);
ss[5] = word_in(in_key, 5);
cx->ks[5] = ff(ss[5]);
ss[6] = word_in(in_key, 6);
cx->ks[6] = ff(ss[6]);
ss[7] = word_in(in_key, 7);
cx->ks[7] = ff(ss[7]);
kdf8(cx->ks, 0); kd8(cx->ks, 1);
kd8(cx->ks, 2); kd8(cx->ks, 3);
kd8(cx->ks, 4); kd8(cx->ks, 5);
......
......@@ -5,27 +5,27 @@
LICENSE TERMS
The free distribution and use of this software in both source and binary
The free distribution and use of this software in both source and binary
form is allowed (with or without changes) provided that:
1. distributions of this source code include the above copyright
1. distributions of this source code include the above copyright
notice, this list of conditions and the following disclaimer;
2. distributions in binary form include the above copyright
notice, this list of conditions and the following disclaimer
in the documentation and/or other associated materials;
3. the copyright holder's name is not used to endorse products
built using this software without specific written permission.
3. the copyright holder's name is not used to endorse products
built using this software without specific written permission.
ALTERNATIVELY, provided that this notice is retained in full, this product
may be distributed under the terms of the GNU General Public License (GPL),
in which case the provisions of the GPL apply INSTEAD OF those given above.
DISCLAIMER
This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
in respect of its properties, including, but not limited to, correctness
and/or fitness for purpose.
---------------------------------------------------------------------------
Issue Date: 26/08/2003
......@@ -76,7 +76,7 @@
#else
#include <stdint.h>
#endif
typedef int64_t sha2_64t;
typedef uint64_t sha2_64t;
#if __WORDSIZE==64
#define s_u64 ul
#else
......@@ -139,22 +139,22 @@ sha2_void sha512_compile(sha512_ctx ctx[1]);
sha2_void sha256_begin(sha256_ctx ctx[1]);
sha2_void sha256_hash(const unsigned char data[], unsigned long len, sha256_ctx ctx[1]);
sha2_void sha256_end(unsigned char hval[], sha256_ctx ctx[1]);
sha2_void sha256(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_void sha256(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_void sha384_begin(sha384_ctx ctx[1]);
#define sha384_hash sha512_hash
sha2_void sha384_end(unsigned char hval[], sha384_ctx ctx[1]);
sha2_void sha384(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_void sha384(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_void sha512_begin(sha512_ctx ctx[1]);
sha2_void sha512_hash(const unsigned char data[], unsigned long len, sha512_ctx ctx[1]);
sha2_void sha512_end(unsigned char hval[], sha512_ctx ctx[1]);
sha2_void sha512(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_void sha512(unsigned char hval[], const unsigned char data[], unsigned long len);
sha2_int sha2_begin(unsigned long size, sha2_ctx ctx[1]);
sha2_void sha2_hash(const unsigned char data[], unsigned long len, sha2_ctx ctx[1]);
sha2_void sha2_end(unsigned char hval[], sha2_ctx ctx[1]);
sha2_int sha2(unsigned char hval[], unsigned long size, const unsigned char data[], unsigned long len);
sha2_int sha2(unsigned char hval[], unsigned long size, const unsigned char data[], unsigned long len);
#endif
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