Add clang support.

This commit is contained in:
James Grogan 2023-01-23 11:32:18 +00:00
parent 3fad113178
commit e559f9674d
27 changed files with 84 additions and 63 deletions

View file

@ -49,7 +49,6 @@ private:
void dumpNode(RawNode<CountPair>* node, unsigned depth) const;
bool mUseFixedCode{false};
bool mTableIsInitialized{false};
std::vector<unsigned char> mSymbolMapping;
HuffmanCodeLengthTable mLiteralLengthTable;

View file

@ -30,7 +30,6 @@ public:
KeyValuePairs getKeyValuePairs() const;
private:
unsigned mLineOffset{ 0 };
std::string mHeader;
std::unordered_map<std::string, std::unique_ptr<TomlTable> > mTables;
KeyValuePairs mMap;

View file

@ -25,6 +25,5 @@ public:
void writeBytes(const std::vector<unsigned char> data) override;
private:
unsigned mBufferSize{0};
std::vector<unsigned char> mBuffer;
};

View file

@ -9,6 +9,11 @@ AbstractGrid::AbstractGrid(const Bounds& bounds, std::size_t numPointsX, std::si
}
AbstractGrid::~AbstractGrid()
{
}
const Bounds& AbstractGrid::getBounds() const
{
return mBounds;
@ -29,4 +34,4 @@ double AbstractGrid::getYSpacing() const
void AbstractGrid::resetBounds(const Bounds& bounds)
{
mBounds = bounds;
}
}

View file

@ -10,6 +10,8 @@ class AbstractGrid
public:
AbstractGrid(const Bounds& bounds, std::size_t numPointsX, std::size_t numPointsY, std::size_t numPointsZ = 1);
virtual ~AbstractGrid();
const Bounds& getBounds() const;
virtual std::size_t getDataSize() const = 0;
@ -25,4 +27,4 @@ protected:
std::size_t mNumX{ 0 };
std::size_t mNumY{ 0 };
std::size_t mNumZ{ 0 };
};
};

View file

@ -32,7 +32,7 @@ public:
this->mData->setItem(getOffset(idx, jdx, kdx), value);
}
std::size_t getDataSize() const
std::size_t getDataSize() const override
{
return this->mData->getLength();
}

View file

@ -14,7 +14,6 @@
#include <arpa/inet.h>
UnixSocketInterface::UnixSocketInterface()
: mBufferSize(1024)
{
mMessageHandler = std::make_unique<HttpMessageHandler>();
}

View file

@ -27,7 +27,6 @@ public:
private:
static constexpr unsigned BUFFER_SIZE{1024};
std::size_t mBufferSize { 0 };
std::unique_ptr<ISocketMessageHandler> mMessageHandler;
};

View file

@ -9,20 +9,22 @@ class Image;
class IImageWriter
{
public:
enum class ImgFormat
{
PNG,
UNKNOWN
};
enum class ImgFormat
{
PNG,
UNKNOWN
};
IImageWriter(ImgFormat format)
: mFormat(format)
{
};
IImageWriter(ImgFormat format)
: mFormat(format)
{
virtual void write(const Path& path, Image* image) = 0;
};
virtual ~IImageWriter() = default;
virtual void write(const Path& path, Image* image) = 0;
protected:
ImgFormat mFormat{ ImgFormat::UNKNOWN };
};
ImgFormat mFormat{ ImgFormat::UNKNOWN };
};

View file

@ -19,7 +19,7 @@ public:
std::string toString(PdfXRefTable* xRefTable) override;
void updateDictionary();
void updateDictionary() override;
private:
std::vector<PdfOutlinePtr> mOutlines;

View file

@ -17,7 +17,7 @@ class PdfFont : public PdfObject
public:
std::string toString(PdfXRefTable* xRefTable) override;
void updateDictionary();
void updateDictionary() override;
};
class PdfPage : public PdfObject
@ -25,11 +25,11 @@ class PdfPage : public PdfObject
public:
PdfPage(PdfPageTree* parent);
unsigned indexObjects(unsigned count);
unsigned indexObjects(unsigned count) override;
std::string toString(PdfXRefTable* xRefTable) override;
void updateDictionary();
void updateDictionary() override;
private:
unsigned mWidth{612};

View file

@ -20,7 +20,7 @@ public:
std::size_t getNumNodes() const override;
void replaceEdge(Edge* original, Edge* replacement);
void replaceEdge(Edge* original, Edge* replacement) override;
std::size_t getEdge0Id () const;
std::size_t getEdge1Id () const;

View file

@ -11,5 +11,5 @@ public:
std::unique_ptr<AbstractMesh> copy() const override;
MeshType getType() const;
MeshType getType() const override;
};

View file

@ -12,10 +12,10 @@ class LineNode : public GeometryNode
public:
LineNode(const Transform& transform, const std::vector<Point>& points);
Type getType();
Type getType() override;
private:
void createOrUpdateGeometry(SceneInfo* sceneInfo) override;
std::vector<Point> mPoints;
};
};

View file

@ -135,6 +135,7 @@ void TextNode::updateLines(FontsManager* fontsManager)
}
output_lines.push_back(working_line);
running_width = 0;
(void)running_width;
}
mTextData.mLines = output_lines;

View file

@ -42,6 +42,5 @@ private:
std::unique_ptr<AbstractGeometricItem> mGeometry;
bool mGeometryIsDirty{true};
bool mColorMapIsDirty{true};
bool mShowOutline{false};
};

View file

@ -120,7 +120,7 @@ void SvgPainter::setStyle(SceneModel* model, SvgShapeElement* element) const
if (!transform.isDefaultTransform())
{
element->addAttribute(std::move(toTransform(transform)));
element->addAttribute(toTransform(transform));
}
}

View file

@ -43,7 +43,7 @@ void TabbedPanelWidget::addPanel(WidgetUPtr panel, const std::string& label)
auto rawPanel = panel.get();
auto onClick = [this, rawPanel](Widget*){
if(this && rawPanel)
if(rawPanel)
{
this->getStack()->showChild(rawPanel);
}

View file

@ -17,12 +17,9 @@ TopBar::TopBar()
fileButton->setMaxWidth(60);
auto onClick = [this](Widget* self){
if(this)
{
auto menu = std::make_unique<TopBarMenu>();
auto window = getTopLevelWindow();
window->addPopup(std::move(menu));
};
auto menu = std::make_unique<TopBarMenu>();
auto window = getTopLevelWindow();
window->addPopup(std::move(menu));
};
fileButton->setOnClickFunction(onClick);
addWidget(std::move(fileButton));

View file

@ -12,8 +12,7 @@
TextBox::TextBox()
: Widget(),
mContent(),
mCaps(false)
mContent()
{
mBackground = Theme::Sys::Color::Background;
mPadding = {20, 0, 20, 0};

View file

@ -32,7 +32,6 @@ private:
std::string mContent;
std::unique_ptr<TextNode> mTextNode;
bool mContentDirty{true};
bool mCaps;
};
using TextBoxUPtr = std::unique_ptr<TextBox>;

View file

@ -47,4 +47,6 @@ class ITheme
{
public:
virtual Color getColor(Theme::Sys::Color token) const = 0;
virtual ~ITheme() = default;
};