- Backend update from Raze.

This is mainly code cleanup from setting the compiler to a stricter warning level.
This commit is contained in:
Christoph Oelckers 2021-12-29 10:25:31 +01:00
commit 1c517d19fa
102 changed files with 493 additions and 590 deletions

View file

@ -234,7 +234,7 @@ void PaletteContainer::UpdateTranslation(int trans, FRemapTable* remap)
int PaletteContainer::AddTranslation(int slot, FRemapTable* remap, int count)
{
uint32_t id;
uint32_t id = 0;
for (int i = 0; i < count; i++)
{
auto newremap = AddRemap(&remap[i]);
@ -265,7 +265,7 @@ FRemapTable *PaletteContainer::TranslationToTable(int translation)
unsigned int type = GetTranslationType(translation);
unsigned int index = GetTranslationIndex(translation);
if (type < 0 || type >= TranslationTables.Size() || index >= NumTranslations(type))
if (type >= TranslationTables.Size() || index >= NumTranslations(type))
{
return uniqueRemaps[0]; // this is the identity table.
}
@ -649,7 +649,6 @@ bool FRemapTable::AddTint(int start, int end, int r, int g, int b, int amount)
bool FRemapTable::AddToTranslation(const char *range)
{
int start,end;
bool desaturated = false;
FScanner sc;
sc.OpenMem("translation", range, int(strlen(range)));