Replace raw buffers with std containers (#1101)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2023-08-06 15:46:59 -07:00
committed by GitHub
parent 868f4eef3d
commit dcef356e3f
14 changed files with 444 additions and 438 deletions

View File

@ -26,6 +26,7 @@
#include "oggpage.h"
#include <algorithm>
#include <array>
#include "tstring.h"
#include "tdebug.h"
@ -44,7 +45,7 @@ namespace {
*/
unsigned int pageChecksum(const ByteVector &data)
{
static const unsigned int crcTable[256] = {
static constexpr std::array<unsigned int, 256> crcTable {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,