Browse Source

A couple of clean ups suggested by Android Studio/Clang Tidy

pull/2191/head^2
Anders Jenbo 5 years ago
parent
commit
f99ef2c195
  1. 2
      Source/capture.cpp
  2. 6
      Source/codec.cpp

2
Source/capture.cpp

@ -44,7 +44,7 @@ static bool CaptureHdr(short width, short height, std::ofstream *out)
}
/**
* @brief Write the current ingame palette to the PCX file
* @brief Write the current in-game palette to the PCX file
* @param palette Current palette
* @param out File stream for the PCX file.
* @return True if successful, else false

6
Source/codec.cpp

@ -22,7 +22,7 @@ struct CodecSignature {
#define BLOCKSIZE 64
static void codec_init_key(const char *pszPassword)
static void CodecInitKey(const char *pszPassword)
{
char key[136]; // last 64 bytes are the SHA1
uint32_t rand_state = 0x7058;
@ -61,7 +61,7 @@ std::size_t codec_decode(byte *pbSrcDst, std::size_t size, const char *pszPasswo
int i;
CodecSignature *sig;
codec_init_key(pszPassword);
CodecInitKey(pszPassword);
if (size <= sizeof(CodecSignature))
return 0;
size -= sizeof(CodecSignature);
@ -116,7 +116,7 @@ void codec_encode(byte *pbSrcDst, std::size_t size, std::size_t size_64, const c
if (size_64 != codec_get_encoded_len(size))
app_fatal("Invalid encode parameters");
codec_init_key(pszPassword);
CodecInitKey(pszPassword);
last_chunk = 0;
while (size != 0) {

Loading…
Cancel
Save