Skip to content

Commit

Permalink
Merge pull request #5136 from lioncash/ar
Browse files Browse the repository at this point in the history
ARDecrypt: const correctness
  • Loading branch information
Parlane committed Mar 23, 2017
2 parents 9ea5913 + 1d6d859 commit 6a17d87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Core/ARDecrypt.cpp
Expand Up @@ -209,7 +209,7 @@ static void buildseeds()
generateseeds(genseeds, gensubtable, 0);
}

static void getcode(u32* src, u32* addr, u32* val)
static void getcode(const u32* src, u32* addr, u32* val)
{
*addr = Common::swap32(src[0]);
*val = Common::swap32(src[1]);
Expand All @@ -221,7 +221,7 @@ static void setcode(u32* dst, u32 addr, u32 val)
dst[1] = Common::swap32(val);
}

static u16 gencrc16(u32* codes, u16 size)
static u16 gencrc16(const u32* codes, u16 size)
{
u16 ret = 0;

Expand All @@ -239,7 +239,7 @@ static u16 gencrc16(u32* codes, u16 size)
return ret;
}

static u8 verifycode(u32* codes, u16 size)
static u8 verifycode(const u32* codes, u16 size)
{
u16 tmp = gencrc16(codes, size);
return (((tmp >> 12) ^ (tmp >> 8) ^ (tmp >> 4) ^ tmp) & 0x0F);
Expand Down Expand Up @@ -299,7 +299,7 @@ static void unscramble2(u32* addr, u32* val)
*addr = _rotr((*addr ^ tmp), 4);
}

static void decryptcode(u32* seeds, u32* code)
static void decryptcode(const u32* seeds, u32* code)
{
u32 addr, val;
u32 tmp, tmp2;
Expand Down

0 comments on commit 6a17d87

Please sign in to comment.