Add wextra level warnings.
This commit is contained in:
parent
e559f9674d
commit
119ea6f2cc
62 changed files with 235 additions and 231 deletions
|
@ -20,7 +20,7 @@ if(MSVC)
|
|||
else()
|
||||
#set(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
#set(GCC_COVERAGE_LINK_FLAGS "-lgcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
||||
endif()
|
||||
|
|
|
@ -11,14 +11,14 @@ CanvasCommandSelectorView::CanvasCommandSelectorView()
|
|||
{
|
||||
auto circle_button = Button::Create();
|
||||
|
||||
auto on_circle_click = [this](Widget* self){
|
||||
auto on_circle_click = [this](Widget*){
|
||||
onCommandSelected(CanvasDrawCommand::CIRCLE);
|
||||
};
|
||||
circle_button->setLabel("Circle");
|
||||
circle_button->setMargin(2);
|
||||
circle_button->setOnClickFunction(on_circle_click);
|
||||
|
||||
auto on_line_click = [this](Widget* self){
|
||||
auto on_line_click = [this](Widget*){
|
||||
onCommandSelected(CanvasDrawCommand::LINE);
|
||||
};
|
||||
auto line_button = Button::Create();
|
||||
|
|
|
@ -31,7 +31,7 @@ bool CanvasDrawingArea::isDirty() const
|
|||
return Widget::isDirty() || mContentDirty;
|
||||
}
|
||||
|
||||
void CanvasDrawingArea::doPaint(const PaintEvent* event)
|
||||
void CanvasDrawingArea::doPaint(const PaintEvent*)
|
||||
{
|
||||
mContentDirty = false;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ void TextEditorView::initialize()
|
|||
saveButton->setLabel("Save");
|
||||
saveButton->setBackground(Theme::Sys::Color::Primary);
|
||||
saveButton->setMargin(2);
|
||||
auto onSave = [this](Widget* self){
|
||||
auto onSave = [this](Widget*){
|
||||
if(mController && mTextBox)
|
||||
{
|
||||
mController->SetContent(mTextBox->getContent());
|
||||
|
@ -47,7 +47,7 @@ void TextEditorView::initialize()
|
|||
auto clearButton = Button::Create();
|
||||
clearButton->setLabel("Clear");
|
||||
clearButton->setMargin(2);
|
||||
auto onClear = [this](Widget* self){
|
||||
auto onClear = [this](Widget*){
|
||||
if(mController && mTextBox)
|
||||
{
|
||||
mController->OnClear();
|
||||
|
@ -59,7 +59,7 @@ void TextEditorView::initialize()
|
|||
auto loadButton = Button::Create();
|
||||
loadButton->setLabel("Load");
|
||||
loadButton->setMargin(2);
|
||||
auto onLoad = [this](Widget* self){
|
||||
auto onLoad = [this](Widget*){
|
||||
if(mController && mTextBox)
|
||||
{
|
||||
mController->OnLoad();
|
||||
|
|
|
@ -4,8 +4,8 @@ const TruthTable::TableData TruthTable::AND_TRUTH_TABLE = { {{0, 0}, {0}} };
|
|||
|
||||
TruthTable TruthTable::getAndTruthTable()
|
||||
{
|
||||
TruthTable table(2, 1);
|
||||
table.setTable(AND_TRUTH_TABLE);
|
||||
return table;
|
||||
TruthTable table(2, 1);
|
||||
table.setTable(AND_TRUTH_TABLE);
|
||||
return table;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class TruthTable
|
|||
public:
|
||||
using TableData = std::map<std::vector<bool>, std::vector<bool> >;
|
||||
|
||||
TruthTable(std::size_t numInputColumns, std::size_t numOutputColumns)
|
||||
TruthTable(std::size_t, std::size_t)
|
||||
//: mNumInputColumns(numInputColumns),
|
||||
// mNumOutputColumns(numOutputColumns)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ void ElectronicCircuitNode::setContent(ElectronicCircuit* content)
|
|||
mContentDirty = true;
|
||||
}
|
||||
|
||||
void ElectronicCircuitNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
||||
void ElectronicCircuitNode::createOrUpdateGeometry(SceneInfo*)
|
||||
{
|
||||
mInputTerminalNodes.clear();
|
||||
mWireNodes.clear();
|
||||
|
|
|
@ -33,7 +33,7 @@ void LogicGateNode::update(SceneInfo* sceneInfo)
|
|||
}
|
||||
}
|
||||
|
||||
void LogicGateNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
||||
void LogicGateNode::createOrUpdateGeometry(SceneInfo*)
|
||||
{
|
||||
if (!mPrimaryPath)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ void TerminalNode::setContent(Terminal* terminal)
|
|||
mContent = terminal;
|
||||
}
|
||||
|
||||
void TerminalNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
||||
void TerminalNode::createOrUpdateGeometry(SceneInfo*)
|
||||
{
|
||||
if (!mMarker)
|
||||
{
|
||||
|
@ -32,4 +32,4 @@ void TerminalNode::update(SceneInfo* sceneInfo)
|
|||
createOrUpdateGeometry(sceneInfo);
|
||||
mContentDirty = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ int MidiMetaEventAdapter::ReadChannelPrefixEvent(std::ifstream* file, MetaMidiEv
|
|||
return byteCount;
|
||||
}
|
||||
|
||||
int MidiMetaEventAdapter::ReadTimeSignatureEvent(std::ifstream* file, MetaMidiEvent* event)
|
||||
int MidiMetaEventAdapter::ReadTimeSignatureEvent(std::ifstream* file, MetaMidiEvent*)
|
||||
{
|
||||
unsigned byteCount = 0;
|
||||
int length = *BinaryStream::getNextByteAsInt(file);
|
||||
|
@ -154,7 +154,7 @@ int MidiMetaEventAdapter::ReadTimeSignatureEvent(std::ifstream* file, MetaMidiEv
|
|||
return byteCount;
|
||||
}
|
||||
|
||||
int MidiMetaEventAdapter::ReadKeySignatureEvent(std::ifstream* file, MetaMidiEvent* event)
|
||||
int MidiMetaEventAdapter::ReadKeySignatureEvent(std::ifstream* file, MetaMidiEvent*)
|
||||
{
|
||||
unsigned byteCount = 0;
|
||||
int length = *BinaryStream::getNextByteAsInt(file);
|
||||
|
@ -168,7 +168,7 @@ int MidiMetaEventAdapter::ReadKeySignatureEvent(std::ifstream* file, MetaMidiEve
|
|||
return byteCount;
|
||||
}
|
||||
|
||||
int MidiMetaEventAdapter::ReadTimeCodeEvent(std::ifstream* file, MetaMidiEvent* event)
|
||||
int MidiMetaEventAdapter::ReadTimeCodeEvent(std::ifstream* file, MetaMidiEvent*)
|
||||
{
|
||||
unsigned byteCount = 0;
|
||||
int length = *BinaryStream::getNextByteAsInt(file);
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
#include "LineNode.h"
|
||||
|
||||
BlochSphereNode::BlochSphereNode(const Point& location)
|
||||
: AbstractVisualNode(location, "BlochSphereNode")
|
||||
: AbstractVisualNode(location, "BlochSphereNode")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BlochSphereNode::setContent(BlochSphere* content)
|
||||
{
|
||||
mContent = content;
|
||||
mContentDirty = true;
|
||||
mContent = content;
|
||||
mContentDirty = true;
|
||||
}
|
||||
|
||||
void BlochSphereNode::setSize(double size)
|
||||
{
|
||||
if (size != mSize)
|
||||
{
|
||||
mSize = size;
|
||||
mContentDirty = true;
|
||||
}
|
||||
if (size != mSize)
|
||||
{
|
||||
mSize = size;
|
||||
mContentDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void BlochSphereNode::update(SceneInfo* sceneInfo)
|
||||
void BlochSphereNode::update(SceneInfo*)
|
||||
{
|
||||
if (!mContentDirty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!mContentDirty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mChildren.clear();
|
||||
mChildren.clear();
|
||||
|
||||
auto loc = Point(mSize / 2.0, mSize / 2.0);
|
||||
mInnerCircle = std::make_unique<CircleNode>(loc, mSize / 2.0);
|
||||
mInnerCircle->setMinorRadius(mSize / 4.0);
|
||||
mInnerCircle->setStrokeThickness(0.5);
|
||||
auto loc = Point(mSize / 2.0, mSize / 2.0);
|
||||
mInnerCircle = std::make_unique<CircleNode>(loc, mSize / 2.0);
|
||||
mInnerCircle->setMinorRadius(mSize / 4.0);
|
||||
mInnerCircle->setStrokeThickness(0.5);
|
||||
|
||||
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
|
||||
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
|
||||
|
||||
const auto end_point_x = Point(loc.getX() + 1.2 * mSize / 2.0, loc.getY());
|
||||
const std::vector<Point> points{end_point_x };
|
||||
mXAxis = std::make_unique<LineNode>(loc, points);
|
||||
const auto end_point_x = Point(loc.getX() + 1.2 * mSize / 2.0, loc.getY());
|
||||
const std::vector<Point> points{end_point_x };
|
||||
mXAxis = std::make_unique<LineNode>(loc, points);
|
||||
|
||||
mCentreCircle = std::make_unique<CircleNode>(loc, mSize / 50.0);
|
||||
mCentreCircle->setFillColor(Color(0, 0, 0));
|
||||
mCentreCircle->setHasStrokeColor(false);
|
||||
mCentreCircle = std::make_unique<CircleNode>(loc, mSize / 50.0);
|
||||
mCentreCircle->setFillColor(Color(0, 0, 0));
|
||||
mCentreCircle->setHasStrokeColor(false);
|
||||
|
||||
addChild(mInnerCircle.get());
|
||||
addChild(mOuterCircle.get());
|
||||
addChild(mXAxis.get());
|
||||
addChild(mCentreCircle.get());
|
||||
}
|
||||
addChild(mInnerCircle.get());
|
||||
addChild(mOuterCircle.get());
|
||||
addChild(mXAxis.get());
|
||||
addChild(mCentreCircle.get());
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ const std::string& TemplateExpression::getContent() const
|
|||
return mContent;
|
||||
}
|
||||
|
||||
std::string TemplateExpression::render(TemplateSubstitutionContext* substitutions, TemplateNode* parentContext)
|
||||
std::string TemplateExpression::render(TemplateSubstitutionContext* substitutions, TemplateNode*)
|
||||
{
|
||||
if (substitutions && substitutions->hasSubstitution(mContent))
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ bool TemplateTextBody::hasContent() const
|
|||
return !mContent.empty();
|
||||
}
|
||||
|
||||
std::string TemplateTextBody::render(TemplateSubstitutionContext* substitutions, TemplateNode* parentContext)
|
||||
std::string TemplateTextBody::render(TemplateSubstitutionContext*, TemplateNode*)
|
||||
{
|
||||
std::string content;
|
||||
for(unsigned idx=0; idx<mContent.size(); idx++)
|
||||
|
|
|
@ -191,7 +191,7 @@ void TemplateFile::onFoundBlock(const std::vector<std::string> args)
|
|||
mWorkingNode = temp;
|
||||
}
|
||||
|
||||
void TemplateFile::onFoundEndBlock(const std::vector<std::string> args)
|
||||
void TemplateFile::onFoundEndBlock(const std::vector<std::string>)
|
||||
{
|
||||
mWorkingNode = mWorkingNode->getParent();
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ void HuffmanEncoder::setUseFixedCode(bool useFixed)
|
|||
mUseFixedCode = useFixed;
|
||||
}
|
||||
|
||||
uint32_t HuffmanEncoder::getLengthValue(unsigned length)
|
||||
uint32_t HuffmanEncoder::getLengthValue(unsigned)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ bool HuffmanStream::readNextDistanceSymbol(unsigned& buffer)
|
|||
return true;
|
||||
}
|
||||
|
||||
void HuffmanStream::addValue(unsigned value, unsigned& count, unsigned& lastValue, std::vector<unsigned char>& literals, unsigned numLiterals, std::vector<unsigned char>& distances)
|
||||
void HuffmanStream::addValue(unsigned value, unsigned& count, unsigned& lastValue, std::vector<unsigned char>& literals, unsigned, std::vector<unsigned char>& distances)
|
||||
{
|
||||
if (count < mNumLiterals)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,8 @@ void CommandLineArgs::initialize(CommandLineArgs* args)
|
|||
::LocalFree(szArglist);
|
||||
|
||||
args->process(windowsArgs);
|
||||
#else
|
||||
(void)args;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ std::string File::dumpBinary()
|
|||
const unsigned char val = static_cast<unsigned char>(mInHandle->get());
|
||||
const unsigned char ascii_val = std::isalpha(val) ? val : '.';
|
||||
sstr << count << " | " << ByteUtils::toString(val) << " | " << static_cast<int>(val) << " | " << ascii_val << '\n';
|
||||
if (count < 0 && count % 10 == 0)
|
||||
if (count % 10 == 0)
|
||||
{
|
||||
sstr << "\n";
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ void FileLogger::LogLine(const std::string& logType, const std::ostringstream& l
|
|||
|
||||
std::time_t t = std::time(nullptr);
|
||||
const std::string cleanedFileName = fileName.substr(fileName.find_last_of("/\\") + 1);
|
||||
std::tm time_buf = { 0 };
|
||||
std::tm time_buf{ };
|
||||
#ifdef WIN32
|
||||
gmtime_s(&time_buf, &t);
|
||||
#else
|
||||
|
|
|
@ -16,7 +16,7 @@ class InputBitStream : public BitStream
|
|||
|
||||
void writeByte(unsigned char data, bool checkOverflow = true) override;
|
||||
|
||||
void writeBytes(const std::vector<unsigned char> data) override
|
||||
void writeBytes(const std::vector<unsigned char>) override
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ void SqliteInterface::open(Database* db)
|
|||
}
|
||||
}
|
||||
|
||||
static int callback(void *NotUsed, int argc, char **argv, char **azColName)
|
||||
static int callback(void *, int argc, char **, char **)
|
||||
{
|
||||
for(int i=0; i<argc; i++)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ const Point& Arc::getLocation() const
|
|||
return mStartPoint;
|
||||
}
|
||||
|
||||
void Arc::sample(SparseGrid<bool>* grid) const
|
||||
void Arc::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -77,4 +77,4 @@ Arc::Type Arc::getType() const
|
|||
Arc::CurveType Arc::getCurveType() const
|
||||
{
|
||||
return CurveType::ARC;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
CurveType getCurveType() const override;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
|
||||
|
@ -32,4 +32,4 @@ private:
|
|||
double mRotation{ 0 };
|
||||
bool mLargeArc{ false };
|
||||
bool mSweep{ false };
|
||||
};
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ const Point& CubicBezierCurve::getLocation() const
|
|||
return mStartPoint;
|
||||
}
|
||||
|
||||
void CubicBezierCurve::sample(SparseGrid<bool>* grid) const
|
||||
void CubicBezierCurve::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -62,4 +62,4 @@ CubicBezierCurve::Type CubicBezierCurve::getType() const
|
|||
CubicBezierCurve::CurveType CubicBezierCurve::getCurveType() const
|
||||
{
|
||||
return CurveType::CUBIC_BEZIER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
CurveType getCurveType() const override;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
|
||||
|
@ -29,4 +29,4 @@ private:
|
|||
Point mEndPoint;
|
||||
Point mStartControlPoint;
|
||||
Point mEndControlPoint;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
class Curve : public PathElement
|
||||
{
|
||||
public:
|
||||
enum class CurveType
|
||||
{
|
||||
ARC,
|
||||
QUADRATIC_BEZIER,
|
||||
CUBIC_BEZIER,
|
||||
UNKNOWN
|
||||
};
|
||||
enum class CurveType
|
||||
{
|
||||
ARC,
|
||||
QUADRATIC_BEZIER,
|
||||
CUBIC_BEZIER,
|
||||
UNKNOWN
|
||||
};
|
||||
|
||||
virtual CurveType getCurveType() const = 0;
|
||||
};
|
||||
virtual CurveType getCurveType() const = 0;
|
||||
};
|
||||
|
|
|
@ -9,37 +9,37 @@
|
|||
class Line : public PathElement
|
||||
{
|
||||
public:
|
||||
enum class InputBufferType
|
||||
{
|
||||
HORIZONTAL_REL,
|
||||
HORIZONTAL_ABS,
|
||||
VERTICAL_REL,
|
||||
VERTICAL_ABS,
|
||||
XY_REL,
|
||||
XY_ABS
|
||||
};
|
||||
enum class InputBufferType
|
||||
{
|
||||
HORIZONTAL_REL,
|
||||
HORIZONTAL_ABS,
|
||||
VERTICAL_REL,
|
||||
VERTICAL_ABS,
|
||||
XY_REL,
|
||||
XY_ABS
|
||||
};
|
||||
|
||||
Line(const Point& start, const PointCollection& points);
|
||||
Line(const Point& start, const PointCollection& points);
|
||||
|
||||
Line(const Point& start, InputBufferType bufferType, const std::vector<double>& buffer);
|
||||
Line(const Point& start, InputBufferType bufferType, const std::vector<double>& buffer);
|
||||
|
||||
const PointCollection& getPoints() const;
|
||||
const PointCollection& getPoints() const;
|
||||
|
||||
Line::Type getType() const override;
|
||||
Line::Type getType() const override;
|
||||
|
||||
const Point& getLocation() const override;
|
||||
const Point& getLocation() const override;
|
||||
|
||||
Bounds getBounds() const override;
|
||||
Bounds getBounds() const override;
|
||||
|
||||
Point getFirstPoint() const override;
|
||||
Point getFirstPoint() const override;
|
||||
|
||||
Point getEndPoint() const override;
|
||||
Point getEndPoint() const override;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override {};
|
||||
void sample(SparseGrid<bool>*) const override {};
|
||||
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
|
||||
private:
|
||||
Point mStartPoint;
|
||||
PointCollection mPoints;
|
||||
};
|
||||
Point mStartPoint;
|
||||
PointCollection mPoints;
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ const Point& LineSegment::getPoint1() const
|
|||
return mP1;
|
||||
}
|
||||
|
||||
void LineSegment::sample(SparseGrid<bool>* grid) const
|
||||
void LineSegment::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
bool isVertical() const;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ GeometryPath::Type GeometryPath::getType() const
|
|||
return GeometryPath::Type::PATH;
|
||||
}
|
||||
|
||||
void GeometryPath::sample(SparseGrid<bool>* grid) const
|
||||
void GeometryPath::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -52,4 +52,4 @@ std::string GeometryPath::getAsPostScript() const
|
|||
{
|
||||
PathPostScriptConverter converter;
|
||||
return converter.toPostScript(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,53 +11,53 @@ using PathElementPtr = std::unique_ptr<PathElement>;
|
|||
class GeometryPathFeature
|
||||
{
|
||||
public:
|
||||
void addElement(PathElementPtr element)
|
||||
{
|
||||
if (mElements.empty())
|
||||
{
|
||||
mLocation = element->getFirstPoint();
|
||||
}
|
||||
mElements.push_back(std::move(element));
|
||||
}
|
||||
void addElement(PathElementPtr element)
|
||||
{
|
||||
if (mElements.empty())
|
||||
{
|
||||
mLocation = element->getFirstPoint();
|
||||
}
|
||||
mElements.push_back(std::move(element));
|
||||
}
|
||||
|
||||
const Point& getLocation() const
|
||||
{
|
||||
return mLocation;
|
||||
}
|
||||
const Point& getLocation() const
|
||||
{
|
||||
return mLocation;
|
||||
}
|
||||
|
||||
const std::vector<PathElementPtr>& getElements() const
|
||||
{
|
||||
return mElements;
|
||||
}
|
||||
const std::vector<PathElementPtr>& getElements() const
|
||||
{
|
||||
return mElements;
|
||||
}
|
||||
|
||||
private:
|
||||
Point mLocation;
|
||||
std::vector<PathElementPtr> mElements;
|
||||
Point mLocation;
|
||||
std::vector<PathElementPtr> mElements;
|
||||
};
|
||||
using GeometryPathFeaturePtr = std::unique_ptr<GeometryPathFeature>;
|
||||
|
||||
class GeometryPath : public AbstractGeometricItem
|
||||
{
|
||||
public:
|
||||
~GeometryPath();
|
||||
~GeometryPath();
|
||||
|
||||
void addFeature(GeometryPathFeaturePtr feature);
|
||||
void addFeature(GeometryPathFeaturePtr feature);
|
||||
|
||||
void buildFromPostscript(const std::string& psString);
|
||||
void buildFromPostscript(const std::string& psString);
|
||||
|
||||
std::string getAsPostScript() const;
|
||||
std::string getAsPostScript() const;
|
||||
|
||||
const Point& getLocation() const override;
|
||||
const Point& getLocation() const override;
|
||||
|
||||
Bounds getBounds() const override;
|
||||
Bounds getBounds() const override;
|
||||
|
||||
Type getType() const override;
|
||||
Type getType() const override;
|
||||
|
||||
const std::vector<GeometryPathFeaturePtr>& getFeatures() const;
|
||||
const std::vector<GeometryPathFeaturePtr>& getFeatures() const;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
private:
|
||||
Point mLocation;
|
||||
std::vector<GeometryPathFeaturePtr> mFeatures;
|
||||
};
|
||||
Point mLocation;
|
||||
std::vector<GeometryPathFeaturePtr> mFeatures;
|
||||
};
|
||||
|
|
|
@ -7,25 +7,25 @@
|
|||
class PathElement : public AbstractGeometricItem
|
||||
{
|
||||
public:
|
||||
enum class PostscriptPositioning
|
||||
{
|
||||
RELATIVE_TO,
|
||||
ABSOLUTE_TO
|
||||
};
|
||||
enum class PostscriptPositioning
|
||||
{
|
||||
RELATIVE_TO,
|
||||
ABSOLUTE_TO
|
||||
};
|
||||
|
||||
~PathElement();
|
||||
~PathElement();
|
||||
|
||||
virtual Point getFirstPoint() const = 0;
|
||||
virtual Point getFirstPoint() const = 0;
|
||||
|
||||
virtual Point getEndPoint() const = 0;
|
||||
virtual Point getEndPoint() const = 0;
|
||||
|
||||
void setPostscriptPositioning(PostscriptPositioning positioning)
|
||||
{
|
||||
mPostscriptPositioning = positioning;
|
||||
}
|
||||
void setPostscriptPositioning(PostscriptPositioning positioning)
|
||||
{
|
||||
mPostscriptPositioning = positioning;
|
||||
}
|
||||
|
||||
virtual std::string toPostScriptString(std::size_t precision = 0) const = 0;
|
||||
virtual std::string toPostScriptString(std::size_t precision = 0) const = 0;
|
||||
|
||||
protected:
|
||||
PostscriptPositioning mPostscriptPositioning{ PostscriptPositioning::RELATIVE_TO};
|
||||
};
|
||||
PostscriptPositioning mPostscriptPositioning{ PostscriptPositioning::RELATIVE_TO};
|
||||
};
|
||||
|
|
|
@ -42,7 +42,7 @@ const Point& QuadraticBezierCurve::getLocation() const
|
|||
return mStartPoint;
|
||||
}
|
||||
|
||||
void QuadraticBezierCurve::sample(SparseGrid<bool>* grid) const
|
||||
void QuadraticBezierCurve::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -55,4 +55,4 @@ QuadraticBezierCurve::Type QuadraticBezierCurve::getType() const
|
|||
QuadraticBezierCurve::CurveType QuadraticBezierCurve::getCurveType() const
|
||||
{
|
||||
return CurveType::QUADRATIC_BEZIER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,26 +6,26 @@
|
|||
class QuadraticBezierCurve : public Curve
|
||||
{
|
||||
public:
|
||||
QuadraticBezierCurve(const Point& startPoint, const Point& endPoint, const Point& controlPoint);
|
||||
QuadraticBezierCurve(const Point& startPoint, const Point& endPoint, const Point& controlPoint);
|
||||
|
||||
Point getFirstPoint() const override;
|
||||
Point getFirstPoint() const override;
|
||||
|
||||
Point getEndPoint() const override;
|
||||
Point getEndPoint() const override;
|
||||
|
||||
Bounds getBounds() const override;
|
||||
Bounds getBounds() const override;
|
||||
|
||||
const Point& getLocation() const override;
|
||||
const Point& getLocation() const override;
|
||||
|
||||
Type getType() const override;
|
||||
Type getType() const override;
|
||||
|
||||
CurveType getCurveType() const override;
|
||||
CurveType getCurveType() const override;
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
std::string toPostScriptString(std::size_t precision = 0) const override;
|
||||
|
||||
private:
|
||||
Point mStartPoint;
|
||||
Point mEndPoint;
|
||||
Point mControlPoint;
|
||||
};
|
||||
Point mStartPoint;
|
||||
Point mEndPoint;
|
||||
Point mControlPoint;
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@ void Circle::setMinorRadius(double radius)
|
|||
mMinorRadius = radius;
|
||||
}
|
||||
|
||||
void Circle::sample(SparseGrid<bool>* grid) const
|
||||
void Circle::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
void setMinorRadius(double radius);
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
private:
|
||||
double mMinorRadius{ 0.5 };
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace ntk {
|
|||
return { minX , maxX , minY , maxY };
|
||||
}
|
||||
|
||||
void Rectangle::sample(SparseGrid<bool>* grid) const
|
||||
void Rectangle::sample(SparseGrid<bool>*) const
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
void setRadius(double radius);
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
void sample(SparseGrid<bool>*) const override;
|
||||
|
||||
private:
|
||||
Point mBottomLeft;
|
||||
|
|
|
@ -37,6 +37,8 @@ void NetworkManager::runHttpServer(AbstractWebApp* webApp)
|
|||
server.initialize();
|
||||
server.run();
|
||||
#else
|
||||
(void)webApp;
|
||||
|
||||
if (!mSocketInterface)
|
||||
{
|
||||
initialize();
|
||||
|
|
|
@ -58,7 +58,7 @@ void AlsaInterface::openDevice(AudioDevice* device)
|
|||
}
|
||||
}
|
||||
|
||||
void AlsaInterface::setAccessType(AudioDevice* device)
|
||||
void AlsaInterface::setAccessType(AudioDevice*)
|
||||
{
|
||||
if (snd_pcm_hw_params_set_access(mHandle, mHardwareParams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ void AlsaInterface::setAccessType(AudioDevice* device)
|
|||
}
|
||||
}
|
||||
|
||||
bool AlsaInterface::setSampleFormat(AudioDevice* device)
|
||||
bool AlsaInterface::setSampleFormat(AudioDevice*)
|
||||
{
|
||||
/* Set sample format */
|
||||
if (snd_pcm_hw_params_set_format(mHandle, mHardwareParams, SND_PCM_FORMAT_S16_LE) < 0)
|
||||
|
|
|
@ -14,7 +14,7 @@ bool ImageBitStream::isFinished() const
|
|||
return mByteOffset == static_cast<int>(mImage->getGrid()->getDataSize());
|
||||
}
|
||||
|
||||
std::vector<unsigned char> ImageBitStream::peekNextNBytes(unsigned n) const
|
||||
std::vector<unsigned char> ImageBitStream::peekNextNBytes(unsigned) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ std::optional<unsigned char> ImageBitStream::readNextByte()
|
|||
return {};
|
||||
}
|
||||
|
||||
void ImageBitStream::writeByte(unsigned char data, bool checkOverflow )
|
||||
void ImageBitStream::writeByte(unsigned char, bool )
|
||||
{
|
||||
mByteOffset++;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
|
||||
void writeByte(unsigned char data, bool checkOverflow = true) override;
|
||||
|
||||
void writeBytes(const std::vector<unsigned char> data) override
|
||||
void writeBytes(const std::vector<unsigned char>) override
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ IFontEngine* FontsManager::getFontEngine() const
|
|||
return mFontEngine.get();
|
||||
}
|
||||
|
||||
FontGlyph* FontsManager::getGlyph(const std::string& fontFace, float size, uint32_t c)
|
||||
FontGlyph* FontsManager::getGlyph(const std::string&, float size, uint32_t c)
|
||||
{
|
||||
auto path = std::filesystem::path("truetype/liberation/LiberationSans-Regular.ttf");
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ std::unique_ptr<DrawingSurface> DrawingSurface::Create()
|
|||
return std::make_unique<DrawingSurface>();
|
||||
}
|
||||
|
||||
void DrawingSurface::setSize(unsigned width, unsigned height, bool triggerResize)
|
||||
void DrawingSurface::setSize(unsigned width, unsigned height, bool)
|
||||
{
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "AbstractMesh.h"
|
||||
|
||||
void AbstractMesh::addConstantNodeVectorAttribute(const std::string& tag, const std::vector<double>& values)
|
||||
void AbstractMesh::addConstantNodeVectorAttribute(const std::string&, const std::vector<double>&)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ AbstractMesh::~AbstractMesh()
|
|||
|
||||
}
|
||||
|
||||
std::vector<std::vector<double> > AbstractMesh::getNodeVectorAttributes(const std::string& tag)
|
||||
std::vector<std::vector<double> > AbstractMesh::getNodeVectorAttributes(const std::string&)
|
||||
{
|
||||
std::vector<std::vector<double> > attribs(mNodes.size());
|
||||
return attribs;
|
||||
|
|
|
@ -101,7 +101,7 @@ std::unique_ptr<LineMesh> MeshPrimitives::buildCircleAsLineMesh(std::size_t numS
|
|||
return MeshBuilder::buildLineMesh(locations, edge_ids);
|
||||
}
|
||||
|
||||
std::unique_ptr<TriMesh> MeshPrimitives::buildRoundedRectangleAsTriMesh(double radius, double aspect_ratio, std::size_t num_segments)
|
||||
std::unique_ptr<TriMesh> MeshPrimitives::buildRoundedRectangleAsTriMesh(double radius, double, std::size_t num_segments)
|
||||
{
|
||||
std::size_t num_fans = 4;
|
||||
std::size_t num_nodes_per_fan = num_segments + 2;
|
||||
|
|
|
@ -29,7 +29,7 @@ std::size_t AbstractVisualNode::getNumSceneItems() const
|
|||
return mSceneItems.size();
|
||||
}
|
||||
|
||||
void AbstractVisualNode::update(SceneInfo* sceneInfo)
|
||||
void AbstractVisualNode::update(SceneInfo*)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ std::size_t GridNode::getNumSceneItems() const
|
|||
return 2;
|
||||
}
|
||||
|
||||
void GridNode::update(SceneInfo* sceneInfo)
|
||||
void GridNode::update(SceneInfo*)
|
||||
{
|
||||
if (!mBackgroundModel || mDataDirty)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ MeshNode::~MeshNode()
|
|||
|
||||
}
|
||||
|
||||
SceneItem* MeshNode::getSceneItem(std::size_t idx) const
|
||||
SceneItem* MeshNode::getSceneItem(std::size_t) const
|
||||
{
|
||||
return mModel.get();
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void MeshNode::setMesh(AbstractMesh* mesh)
|
|||
mMeshIsDirty = true;
|
||||
}
|
||||
|
||||
void MeshNode::update(SceneInfo* sceneInfo)
|
||||
void MeshNode::update(SceneInfo*)
|
||||
{
|
||||
if (!mModel || mMeshIsDirty)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ void Scene::setShowMeshOutline(bool shouldShow)
|
|||
mSceneInfo->mShowMeshOutline = shouldShow;
|
||||
}
|
||||
|
||||
void Scene::setSupportsGeometryPrimitives(bool supports)
|
||||
void Scene::setSupportsGeometryPrimitives(bool)
|
||||
{
|
||||
mSceneInfo->mSupportsGeometryPrimitives = true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ unsigned SvgNode::getContentHeight() const
|
|||
return mContentHeight;
|
||||
}
|
||||
|
||||
void SvgNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
||||
void SvgNode::createOrUpdateGeometry(SceneInfo*)
|
||||
{
|
||||
if (!mContent->getRoot())
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ TopBar::TopBar()
|
|||
fileButton->setMargin(2);
|
||||
fileButton->setMaxWidth(60);
|
||||
|
||||
auto onClick = [this](Widget* self){
|
||||
auto onClick = [this](Widget*){
|
||||
auto menu = std::make_unique<TopBarMenu>();
|
||||
auto window = getTopLevelWindow();
|
||||
window->addPopup(std::move(menu));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
class TopBarMenu : public Widget
|
||||
{
|
||||
public:
|
||||
void popupFrom(Widget* parent)
|
||||
void popupFrom(Widget*)
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ std::unique_ptr<Keyboard> Keyboard::Create()
|
|||
return std::make_unique<Keyboard>();
|
||||
}
|
||||
|
||||
std::string Keyboard::getKeyString(KeyCode code)
|
||||
std::string Keyboard::getKeyString(KeyCode)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
Keyboard::Function Keyboard::getFunction(KeyCode code)
|
||||
Keyboard::Function Keyboard::getFunction(KeyCode)
|
||||
{
|
||||
return Function::UNSET;
|
||||
}
|
||||
|
|
|
@ -4,61 +4,61 @@
|
|||
|
||||
std::string FontTokens::getFont(Theme::Ref::Typeface::Font font)
|
||||
{
|
||||
switch (font)
|
||||
{
|
||||
case Theme::Ref::Typeface::Font::Brand:
|
||||
return "Segoe UI";
|
||||
case Theme::Ref::Typeface::Font::Plain:
|
||||
return "Segoe UI";
|
||||
default:
|
||||
return "Segoe UI";
|
||||
}
|
||||
switch (font)
|
||||
{
|
||||
case Theme::Ref::Typeface::Font::Brand:
|
||||
return "Segoe UI";
|
||||
case Theme::Ref::Typeface::Font::Plain:
|
||||
return "Segoe UI";
|
||||
default:
|
||||
return "Segoe UI";
|
||||
}
|
||||
}
|
||||
|
||||
Theme::Ref::Typeface::Font FontTokens::getFont(Theme::Sys::Typescale typescale)
|
||||
{
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
default:
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
}
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
default:
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned FontTokens::getLineHeight(Theme::Sys::Typescale typescale)
|
||||
{
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return 67;
|
||||
default:
|
||||
return 67;
|
||||
}
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return 67;
|
||||
default:
|
||||
return 67;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned FontTokens::getSize(Theme::Sys::Typescale typescale)
|
||||
{
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return static_cast<unsigned>(57/3.5);
|
||||
default:
|
||||
return 57;
|
||||
}
|
||||
switch (typescale)
|
||||
{
|
||||
case Theme::Sys::Typescale::Label_Large:
|
||||
return static_cast<unsigned>(57/3.5);
|
||||
default:
|
||||
return 57;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned FontTokens::getTracking(Theme::Sys::Typescale typescale)
|
||||
unsigned FontTokens::getTracking(Theme::Sys::Typescale)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned FontTokens::getWeight(Theme::Ref::Typeface::Font font)
|
||||
unsigned FontTokens::getWeight(Theme::Ref::Typeface::Font)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Theme::Ref::Typeface::Font FontTokens::getWeight(Theme::Sys::Typescale typescale)
|
||||
Theme::Ref::Typeface::Font FontTokens::getWeight(Theme::Sys::Typescale)
|
||||
{
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
}
|
||||
return Theme::Ref::Typeface::Font::Brand;
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ bool Widget::onKeyboardEvent(const KeyboardEvent* event)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Widget::onMyKeyboardEvent(const KeyboardEvent* event)
|
||||
bool Widget::onMyKeyboardEvent(const KeyboardEvent*)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ void Widget::setFocus(bool hasFocus)
|
|||
}
|
||||
}
|
||||
|
||||
void Widget::onMyMouseEvent(const MouseEvent* event)
|
||||
void Widget::onMyMouseEvent(const MouseEvent*)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ public:
|
|||
|
||||
void loop() override{};
|
||||
|
||||
void showWindow(mt::Window* window) override{};
|
||||
void showWindow(mt::Window*) override{};
|
||||
|
||||
void addWindow(mt::Window* window) override{};
|
||||
void addWindow(mt::Window*) override{};
|
||||
|
||||
protected:
|
||||
void initialize() override{};
|
||||
|
|
|
@ -73,7 +73,7 @@ bool XcbGlWindowInterface::initialize(xcb_window_t window)
|
|||
return true;
|
||||
}
|
||||
|
||||
void XcbGlWindowInterface::resizeViewPort(unsigned width, unsigned height)
|
||||
void XcbGlWindowInterface::resizeViewPort(unsigned, unsigned)
|
||||
{
|
||||
//glViewport(0, 0, width, height);
|
||||
//glScissor(0, 0, width, height);
|
||||
|
|
|
@ -190,7 +190,7 @@ void XcbInterface::onPaint()
|
|||
mainWindow->doPaint(defaultScreen);
|
||||
}
|
||||
|
||||
void XcbInterface::onExposeEvent(xcb_expose_event_t* event)
|
||||
void XcbInterface::onExposeEvent(xcb_expose_event_t*)
|
||||
{
|
||||
//auto window = mWindows[event->window];
|
||||
//window->SetSize(event->width, event->height);
|
||||
|
|
|
@ -30,7 +30,7 @@ XcbWindow::~XcbWindow()
|
|||
xcb_destroy_window(mConnection, mHandle);
|
||||
}
|
||||
|
||||
void XcbWindow::add(mt::Window* window, xcb_connection_t* connection, mt::Screen* screen, uint32_t eventMask, FontsManager* fontsManager, XcbGlInterface* xcbGlInterface)
|
||||
void XcbWindow::add(mt::Window* window, xcb_connection_t* connection, mt::Screen* screen, uint32_t eventMask, FontsManager*, XcbGlInterface* xcbGlInterface)
|
||||
{
|
||||
if (!screen)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
return Type::TEXT_RUN;
|
||||
}
|
||||
|
||||
std::string toString(unsigned depth = 0, bool keepInline = false) const override
|
||||
std::string toString(unsigned, bool) const override
|
||||
{
|
||||
|
||||
return getText();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "HtmlParagraphElement.h"
|
||||
|
||||
std::string HtmlParagraphElement::toString(unsigned depth, bool keepInline) const
|
||||
std::string HtmlParagraphElement::toString(unsigned depth, bool) const
|
||||
{
|
||||
const auto prefix = std::string(2*depth, ' ');
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
virtual Type getType() const = 0;
|
||||
|
||||
virtual void doFieldSubstitution(Type elementType, const std::string& searchPhrase, const std::string& replacementPhrase)
|
||||
virtual void doFieldSubstitution(Type, const std::string&, const std::string&)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue