From 2de6b7537d37dff82afe5563704949e9d4131a52 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 1 Dec 2019 14:41:46 +0100 Subject: BlockTypePalette: Refactored for usage in both directions. Improves index() lookup speeds and allows BlockTypePalette to be used in place of ProtocolBlockTypePalette. --- src/PalettedBlockArea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PalettedBlockArea.cpp') diff --git a/src/PalettedBlockArea.cpp b/src/PalettedBlockArea.cpp index e703adec0..fd1dcf332 100644 --- a/src/PalettedBlockArea.cpp +++ b/src/PalettedBlockArea.cpp @@ -178,7 +178,7 @@ void PalettedBlockArea::paste(const PalettedBlockArea & aSrc, const cCuboid & aS } // Create a transform map from aSrc's palette to our palette: - auto paletteTransform = mPalette.createTransformMap(aSrc.mPalette); + auto paletteTransform = mPalette.createTransformMapAddMissing(aSrc.mPalette); // Copy the data: UInt32 srcStrideY = static_cast(aSrc.size().x * aSrc.size().z); -- cgit v1.2.3