mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
IWYU pass
This commit is contained in:
parent
539980f75f
commit
caef02e57f
@ -22,6 +22,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <cstring>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "Texture.h"
|
#include "Texture.h"
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
|
@ -19,13 +19,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <stdexcept>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "Block.h"
|
#include "Block.h"
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
#include "ndebug.h"
|
|
||||||
|
|
||||||
namespace quicktex {
|
namespace quicktex {
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "../../Block.h"
|
||||||
#include "../../Color.h"
|
#include "../../Color.h"
|
||||||
#include "../../ndebug.h"
|
|
||||||
#include "BC1Block.h"
|
#include "BC1Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
@ -20,11 +20,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
|
#include "../../Block.h"
|
||||||
#include "../../Decoder.h"
|
#include "../../Decoder.h"
|
||||||
#include "../../Texture.h"
|
#include "../../Texture.h"
|
||||||
#include "../../ndebug.h"
|
|
||||||
#include "../interpolator/Interpolator.h"
|
#include "../interpolator/Interpolator.h"
|
||||||
#include "BC1Block.h"
|
#include "BC1Block.h"
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -31,11 +32,11 @@
|
|||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Color.h"
|
#include "../../Color.h"
|
||||||
#include "../../Matrix4x4.h"
|
#include "../../Matrix4x4.h"
|
||||||
|
#include "../../Texture.h"
|
||||||
#include "../../Vector4.h"
|
#include "../../Vector4.h"
|
||||||
#include "../../Vector4Int.h"
|
#include "../../Vector4Int.h"
|
||||||
#include "../../bitwiseEnums.h"
|
#include "../../bitwiseEnums.h"
|
||||||
#include "../../util.h"
|
#include "../../util.h"
|
||||||
#include "../interpolator/Interpolator.h"
|
|
||||||
#include "Histogram.h"
|
#include "Histogram.h"
|
||||||
#include "OrderTable.h"
|
#include "OrderTable.h"
|
||||||
#include "SingleColorTable.h"
|
#include "SingleColorTable.h"
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Color.h"
|
#include "../../Color.h"
|
||||||
|
@ -27,11 +27,12 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include "../../Vector4.h"
|
#include "../../Vector4.h"
|
||||||
#include "Histogram.h"
|
#include "Histogram.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
template <size_t N> class OrderTable {
|
template <size_t N> class OrderTable {
|
||||||
public:
|
public:
|
||||||
static constexpr unsigned HashCount = 1 << ((N - 1) * 4); // 16**(N-1)
|
static constexpr unsigned HashCount = 1 << ((N - 1) * 4); // 16**(N-1)
|
||||||
|
@ -19,10 +19,7 @@
|
|||||||
|
|
||||||
#include "BC3Decoder.h"
|
#include "BC3Decoder.h"
|
||||||
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../ndebug.h"
|
|
||||||
#include "BC3Block.h"
|
#include "BC3Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Decoder.h"
|
#include "../../Decoder.h"
|
||||||
#include "../../ndebug.h"
|
#include "../../Texture.h"
|
||||||
#include "../bc1/BC1Decoder.h"
|
#include "../bc1/BC1Decoder.h"
|
||||||
#include "../bc4/BC4Decoder.h"
|
#include "../bc4/BC4Decoder.h"
|
||||||
#include "../interpolator/Interpolator.h"
|
#include "../interpolator/Interpolator.h"
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include "BC3Encoder.h"
|
#include "BC3Encoder.h"
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
|
#include "../bc1/BC1Block.h"
|
||||||
|
#include "../bc4/BC4Block.h"
|
||||||
#include "BC3Block.h"
|
#include "BC3Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Encoder.h"
|
#include "../../Encoder.h"
|
||||||
|
#include "../../Texture.h"
|
||||||
#include "../bc1/BC1Encoder.h"
|
#include "../bc1/BC1Encoder.h"
|
||||||
#include "../bc4/BC4Encoder.h"
|
#include "../bc4/BC4Encoder.h"
|
||||||
#include "../interpolator/Interpolator.h"
|
#include "../interpolator/Interpolator.h"
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include <array> // for array
|
#include <array> // for array
|
||||||
#include <cassert> // for assert
|
#include <cassert> // for assert
|
||||||
|
|
||||||
|
#include "../../Block.h"
|
||||||
|
#include "../../Color.h"
|
||||||
#include "BC4Block.h"
|
#include "BC4Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
@ -19,13 +19,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Decoder.h"
|
#include "../../Decoder.h"
|
||||||
#include "../../ndebug.h"
|
#include "../../Texture.h"
|
||||||
#include "BC4Block.h"
|
#include "BC4Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
@ -37,9 +36,9 @@ class BC4Decoder : public BlockDecoder<BlockTexture<BC4Block>> {
|
|||||||
_channel = channel;
|
_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorBlock<4,4> DecodeBlock(const BC4Block &block) const override;
|
ColorBlock<4, 4> DecodeBlock(const BC4Block &block) const override;
|
||||||
|
|
||||||
void DecodeInto(ColorBlock<4,4> &dest, const BC4Block &block) const;
|
void DecodeInto(ColorBlock<4, 4> &dest, const BC4Block &block) const;
|
||||||
|
|
||||||
uint8_t GetChannel() const { return _channel; }
|
uint8_t GetChannel() const { return _channel; }
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "../../Color.h"
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "BC4Block.h"
|
#include "BC4Block.h"
|
||||||
|
|
||||||
|
@ -19,13 +19,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Encoder.h"
|
#include "../../Encoder.h"
|
||||||
#include "../../ndebug.h"
|
#include "../../Texture.h"
|
||||||
#include "BC4Block.h"
|
#include "BC4Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
@ -37,7 +36,7 @@ class BC4Encoder : public BlockEncoder<BlockTexture<BC4Block>> {
|
|||||||
_channel = channel;
|
_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
BC4Block EncodeBlock(const ColorBlock<4,4> &pixels) const override;
|
BC4Block EncodeBlock(const ColorBlock<4, 4> &pixels) const override;
|
||||||
|
|
||||||
uint8_t GetChannel() const { return _channel; }
|
uint8_t GetChannel() const { return _channel; }
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "BC5Decoder.h"
|
#include "BC5Decoder.h"
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../ndebug.h"
|
|
||||||
#include "BC5Block.h"
|
#include "BC5Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
@ -25,9 +25,8 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Texture.h"
|
|
||||||
#include "../../Decoder.h"
|
#include "../../Decoder.h"
|
||||||
#include "../../ndebug.h"
|
#include "../../Texture.h"
|
||||||
#include "../bc4/BC4Decoder.h"
|
#include "../bc4/BC4Decoder.h"
|
||||||
#include "BC5Block.h"
|
#include "BC5Block.h"
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ class BC5Decoder : public BlockDecoder<BlockTexture<BC5Block>> {
|
|||||||
BC5Decoder(uint8_t chan0 = 0, uint8_t chan1 = 1) : BC5Decoder(std::make_shared<BC4Decoder>(chan0), std::make_shared<BC4Decoder>(chan1)) {}
|
BC5Decoder(uint8_t chan0 = 0, uint8_t chan1 = 1) : BC5Decoder(std::make_shared<BC4Decoder>(chan0), std::make_shared<BC4Decoder>(chan1)) {}
|
||||||
BC5Decoder(BC4DecoderPtr chan0_decoder, BC4DecoderPtr chan1_decoder) : _chan0_decoder(chan0_decoder), _chan1_decoder(chan1_decoder) {}
|
BC5Decoder(BC4DecoderPtr chan0_decoder, BC4DecoderPtr chan1_decoder) : _chan0_decoder(chan0_decoder), _chan1_decoder(chan1_decoder) {}
|
||||||
|
|
||||||
ColorBlock<4,4> DecodeBlock(const BC5Block &block) const override;
|
ColorBlock<4, 4> DecodeBlock(const BC5Block &block) const override;
|
||||||
|
|
||||||
ChannelPair GetChannels() const { return ChannelPair(_chan0_decoder->GetChannel(), _chan1_decoder->GetChannel()); }
|
ChannelPair GetChannels() const { return ChannelPair(_chan0_decoder->GetChannel(), _chan1_decoder->GetChannel()); }
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
#include "BC5Encoder.h"
|
#include "BC5Encoder.h"
|
||||||
|
|
||||||
|
#include "../../Block.h"
|
||||||
|
#include "../bc4/BC4Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
BC5Block BC5Encoder::EncodeBlock(const ColorBlock<4, 4> &pixels) const {
|
BC5Block BC5Encoder::EncodeBlock(const ColorBlock<4, 4> &pixels) const {
|
||||||
auto output = BC5Block();
|
auto output = BC5Block();
|
||||||
|
@ -26,12 +26,11 @@
|
|||||||
|
|
||||||
#include "../../Block.h"
|
#include "../../Block.h"
|
||||||
#include "../../Encoder.h"
|
#include "../../Encoder.h"
|
||||||
#include "../../ndebug.h"
|
#include "../../Texture.h"
|
||||||
#include "../bc4/BC4Encoder.h"
|
#include "../bc4/BC4Encoder.h"
|
||||||
#include "BC5Block.h"
|
#include "BC5Block.h"
|
||||||
|
|
||||||
namespace quicktex::s3tc {
|
namespace quicktex::s3tc {
|
||||||
|
|
||||||
class BC5Encoder : public BlockEncoder<BlockTexture<BC5Block>> {
|
class BC5Encoder : public BlockEncoder<BlockTexture<BC5Block>> {
|
||||||
public:
|
public:
|
||||||
using ChannelPair = std::tuple<uint8_t, uint8_t>;
|
using ChannelPair = std::tuple<uint8_t, uint8_t>;
|
||||||
|
@ -55,7 +55,6 @@ function(set_project_warnings project_name)
|
|||||||
-Wpedantic # warn if non-standard C++ is used
|
-Wpedantic # warn if non-standard C++ is used
|
||||||
#-Wconversion # warn on type conversions that may lose data
|
#-Wconversion # warn on type conversions that may lose data
|
||||||
#-Wsign-conversion # warn on sign conversions
|
#-Wsign-conversion # warn on sign conversions
|
||||||
-Wenum-conversion
|
|
||||||
-Wnull-dereference # warn if a null dereference is detected
|
-Wnull-dereference # warn if a null dereference is detected
|
||||||
-Wdouble-promotion # warn if float is implicit promoted to double
|
-Wdouble-promotion # warn if float is implicit promoted to double
|
||||||
-Wformat=2 # warn on security issues around functions that format output
|
-Wformat=2 # warn on security issues around functions that format output
|
||||||
|
Loading…
Reference in New Issue
Block a user