summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/setup_video.cpp3
-rw-r--r--src/localplayer.cpp5
-rw-r--r--src/utils/sha256.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index e0f03ec60..e9811a920 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -702,7 +702,8 @@ void Setup_Video::action(const gcn::ActionEvent &event)
else if (id == "altfpslimitslider")
{
int tempFps = static_cast<int>(mAltFpsSlider->getValue());
- tempFps = tempFps > 0 ? tempFps : static_cast<int>(mAltFpsSlider->getScaleStart());
+ tempFps = tempFps > 0 ? tempFps : static_cast<int>(
+ mAltFpsSlider->getScaleStart());
mAltFps = tempFps;
const std::string text = mAltFps > 0 ? toString(mAltFps) : _("None");
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index b19b1b9af..ff93cdbf1 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -2445,8 +2445,6 @@ void LocalPlayer::crazyMoveA()
// direction command
else if (mMoveProgram[mCrazyMoveState] == 'd')
{
- Uint8 dir = 0;
-
mCrazyMoveState ++;
if (mCrazyMoveState < mMoveProgram.length())
@@ -2492,6 +2490,7 @@ void LocalPlayer::crazyMoveA()
case 'L':
if (Client::limitPackets(PACKET_DIRECTION))
{
+ Uint8 dir = 0;
switch (getDirection())
{
case UP : dir = Being::LEFT; break;
@@ -2507,6 +2506,7 @@ void LocalPlayer::crazyMoveA()
case 'R':
if (Client::limitPackets(PACKET_DIRECTION))
{
+ Uint8 dir = 0;
switch (getDirection())
{
case UP : dir = Being::RIGHT; break;
@@ -2522,6 +2522,7 @@ void LocalPlayer::crazyMoveA()
case 'b':
if (Client::limitPackets(PACKET_DIRECTION))
{
+ Uint8 dir = 0;
switch (getDirection())
{
case UP : dir = Being::DOWN; break;
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp
index dab01a1ea..5d3e4c1d2 100644
--- a/src/utils/sha256.cpp
+++ b/src/utils/sha256.cpp
@@ -254,7 +254,7 @@ void SHA256Update(SHA256Context *ctx,
SHA256Transform(ctx, ctx->block, 1);
SHA256Transform(ctx, shifted_message, block_nb);
rem_len = new_len % SHA256_BLOCK_SIZE;
- memcpy(ctx->block, &shifted_message[block_nb << 6],rem_len);
+ memcpy(ctx->block, &shifted_message[block_nb << 6], rem_len);
ctx->len = rem_len;
ctx->tot_len += (block_nb + 1) << 6;
}