Skip to content
/ qTox Public
forked from TokTok/qTox

Commit

Permalink
cleanup: Use true/false instead of 0/1 for boolean literals.
Browse files Browse the repository at this point in the history
clang-tidy: modernize-use-bool-literals
  • Loading branch information
iphydf committed Jan 2, 2025
1 parent ff2a252 commit 3014906
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Checks: "-*
, modernize-use-bool-literals
, modernize-use-emplace
, readability-named-parameter
, readability-inconsistent-declaration-parameter-name
Expand Down
4 changes: 2 additions & 2 deletions src/core/toxfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct ToxFile
// current form (can add fields though as db representation is an int)
enum FileDirection : bool
{
SENDING = 0,
RECEIVING = 1,
SENDING = false,
RECEIVING = true,
};

ToxFile();
Expand Down
4 changes: 2 additions & 2 deletions src/model/conference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Conference::Conference(int conferenceId_, const ConferenceId persistentConferenc
// in conferences, we only notify on messages containing your name <-- dumb
// sound notifications should be on all messages, but system popup notification
// on naming is appropriate
hasNewMessages = 0;
userWasMentioned = 0;
hasNewMessages = false;
userWasMentioned = false;
regeneratePeerList();
}

Expand Down
8 changes: 4 additions & 4 deletions src/model/exiftransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ QImage applyTransformation(QImage image, Orientation orientation)
case Orientation::TopLeft:
break;
case Orientation::TopRight:
image = image.mirrored(1, 0);
image = image.mirrored(true, false);
break;
case Orientation::BottomRight:
exifTransform.rotate(180);
break;
case Orientation::BottomLeft:
image = image.mirrored(0, 1);
image = image.mirrored(false, true);
break;
case Orientation::LeftTop:
exifTransform.rotate(-90);
image = image.mirrored(1, 0);
image = image.mirrored(true, false);
break;
case Orientation::RightTop:
exifTransform.rotate(90);
break;
case Orientation::RightBottom:
exifTransform.rotate(90);
image = image.mirrored(1, 0);
image = image.mirrored(true, false);
break;
case Orientation::LeftBottom:
exifTransform.rotate(-90);
Expand Down

0 comments on commit 3014906

Please sign in to comment.