You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/05/20 09:26:18 UTC

[GitHub] [nifi-minifi-cpp] adam-markovics commented on a diff in pull request #1330: MINIFICPP-1832 Integrate first batch of clang-tidy checks in CI

adam-markovics commented on code in PR #1330:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1330#discussion_r877913818


##########
extensions/libarchive/FocusArchiveEntry.cpp:
##########
@@ -176,15 +176,13 @@ int64_t FocusArchiveEntry::ReadCallback::operator()(const std::shared_ptr<io::Ba
   archive_read_support_filter_all(inputArchive);
 
   // Read each item in the archive
-  int res;
-
-  if ((res = archive_read_open(inputArchive, &data, ok_cb, read_cb, ok_cb))) {
+  if ((archive_read_open(inputArchive, &data, ok_cb, read_cb, ok_cb))) {

Review Comment:
   Is double parentheses necessary?



##########
extensions/procfs/CpuStat.h:
##########
@@ -34,7 +34,12 @@ class CpuStatData {
  public:
   static std::optional<CpuStatData> parseCpuStatLine(std::istream& iss);
 
-  auto operator<=>(const CpuStatData& rhs) const = default;
+  bool operator<=(const CpuStatData& rhs) const;
+  bool operator>(const CpuStatData& rhs) const;
+  bool operator>=(const CpuStatData& rhs) const;
+  bool operator<(const CpuStatData& rhs) const;
+  bool operator==(const CpuStatData& rhs) const;
+  bool operator!=(const CpuStatData& rhs) const;

Review Comment:
   Does it even make sense to say one CpuStatData is greater than another? If it's only for map storage, equality operator and hash would be enough, and turning the map into an unordered one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org