Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/fifechan/widgets/speechbubble.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ namespace fcn
TailDirection getTailDirection() const;

void setTailProfile(TailProfile const & profile);
// Returning by value is deliberate: a const reference would let a
// binding alias internal state and write to it through a getter.
// cppcheck-suppress returnByReference
TailProfile getTailProfile() const;

void setTailColor(Color color);
Expand Down
8 changes: 3 additions & 5 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "fifechan/graphics.hpp"

// Standard library includes
#include <cassert>
#include <memory>
#include <string>

Expand All @@ -25,10 +24,9 @@ namespace fcn
bool Graphics::pushClipArea(Rectangle area)
{
// Ignore area with a negative width or height by pushing
// an empty clip area to the stack.
assert("Width must be non-negative" && area.width >= 0);
assert("Height must be non-negative" && area.height >= 0);

// an empty clip area to the stack. Rectangle::isEmpty() already
// reports true for width/height <= 0, so the check below handles
// those cases; asserting on them first would defeat that handling.
if (area.isEmpty()) {
ClipRectangle const clip_rect;
mClipStack.push(clip_rect);
Expand Down
1 change: 1 addition & 0 deletions src/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ namespace fcn
return mFocusHandler;
}

// cppcheck-suppress constParameterPointer
void Widget::_detachFocusHandlerFromAll(FocusHandler* focusHandler)
{
for (auto* widget : widgetInstancesRegistry()) {
Expand Down
Loading