Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Added missing includes #1373

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Conversation

FlorianReimold
Copy link
Member

Description

Added many missing includes by Clang tidy include cleaner. I focused on STL headers and only added missing headres, but didn't remove unnecessary headers.

Cherry-pick to

  • master-v5 (master for eCAL 5 feature backporting) (this PR goes to that branch already)
  • 5.13 (current stable)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -24,7 +24,9 @@

#pragma once

#include <cstddef>
#include <ecal/msg/publisher.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/msg/publisher.h' file not found [clang-diagnostic-error]

#include <ecal/msg/publisher.h>
         ^

@@ -24,7 +24,10 @@

#pragma once

#include <cstddef>
#include <cstdint>
#include <ecal/msg/subscriber.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/msg/subscriber.h' file not found [clang-diagnostic-error]

#include <ecal/msg/subscriber.h>
         ^

@@ -25,8 +25,9 @@
#pragma once

#include <ecal/ecal_server.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/ecal_server.h' file not found [clang-diagnostic-error]

#include <ecal/ecal_server.h>
         ^

@@ -24,6 +24,7 @@

#pragma once

#include <cstddef>
#include <ecal/ecal_deprecate.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/ecal_deprecate.h' file not found [clang-diagnostic-error]

#include <ecal/ecal_deprecate.h>
         ^

@@ -24,6 +24,7 @@

#pragma once

#include <cstddef>
#include <ecal/msg/subscriber.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'ecal/msg/subscriber.h' file not found [clang-diagnostic-error]

#include <ecal/msg/subscriber.h>
         ^

#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <stdio.h>
#include <stdlib.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: inclusion of deprecated C++ header 'stdlib.h'; consider using 'cstdlib' instead [modernize-deprecated-headers]

Suggested change
#include <stdlib.h>
#include <cstdlib>

#include <memory>
#include <sstream>
#include <stdio.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead [modernize-deprecated-headers]

Suggested change
#include <stdio.h>
#include <cstdio>


namespace eCAL
namespace eCAL {
class CDataWriterInProc : public CDataWriterBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: class 'CDataWriterInProc' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]

class CDataWriterInProc : public CDataWriterBase
      ^

@@ -23,10 +23,11 @@

#include <ecal/ecal.h>

#include <assert.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: inclusion of deprecated C++ header 'assert.h'; consider using 'cassert' instead [modernize-deprecated-headers]

Suggested change
#include <assert.h>
#include <cassert>

@@ -17,13 +17,16 @@
* ========================= eCAL LICENSE =================================
*/

#include <cstddef>
#include <cstdint>
#include <gtest/gtest.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]

#include <gtest/gtest.h>
         ^

@FlorianReimold FlorianReimold marked this pull request as ready for review February 16, 2024 07:18
@FlorianReimold FlorianReimold marked this pull request as draft February 16, 2024 07:34
@FlorianReimold FlorianReimold added this to the eCAL 5.13 milestone Feb 16, 2024
@rex-schilasky rex-schilasky self-requested a review February 16, 2024 13:15
@FlorianReimold FlorianReimold marked this pull request as ready for review February 16, 2024 13:19
@FlorianReimold FlorianReimold merged commit 36d9413 into master-v5 Feb 16, 2024
9 checks passed
FlorianReimold added a commit that referenced this pull request Feb 16, 2024
FlorianReimold added a commit that referenced this pull request Feb 16, 2024
@FlorianReimold FlorianReimold deleted the hotfix/v5_include_cleaner branch March 1, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants