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

STYLE: Cxx11 modernization steps #104

Merged
merged 6 commits into from
Mar 16, 2020

Conversation

hjmjohnson
Copy link
Contributor

No description provided.

@malaterre
Copy link
Owner

66d7489 is incorrect. I understand why, and will try to submit a patch. Once done, please re-run your scripts.

@hjmjohnson
Copy link
Contributor Author

@malaterre I have removed that patch from the list for now. I'm happy to re-run one task script, but re-running all the scripts is a bit tedious.

@hjmjohnson hjmjohnson changed the title Cxx11 modernization steps WIP: Cxx11 modernization steps Mar 5, 2020
@hjmjohnson
Copy link
Contributor Author

I had an incorrect filter bug that missed all the header files for GDCM. I'm working through that now.

@hjmjohnson hjmjohnson changed the title WIP: Cxx11 modernization steps STYLE: Cxx11 modernization steps Mar 6, 2020
@hjmjohnson hjmjohnson force-pushed the cxx11-modernization-steps branch 2 times, most recently from 7aedd65 to 6128aef Compare March 6, 2020 03:04
@hjmjohnson
Copy link
Contributor Author

@malaterre I removed the offending patch set. Is there a problem with the reset of this?

GDCM/Source/MediaStorageAndFileFormat/gdcmSerieHelper.h:96:17:
warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
  typedef struct {
                ^
                 Rule

See: https://en.cppreference.com/w/cpp/language/typedef
Building CXX object Applications/Cxx/CMakeFiles/gdcmtar.dir/gdcmtar.cxx.o

GDCM/Applications/Cxx/gdcmtar.cxx:1395:13: warning: comparison of different enumeration types ('gdcm::UIDs::TSType' and 'gdcm::UIDs::TSName') [-Wenum-compare]

if( uid != gdcm::UIDs::EnhancedMRImageStorage )
    ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GDCM/Utilities/gdcmopenjpeg/src/lib/openjp2/tcd.c:2227:35:
warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion]
                    if (l_value > INT_MAX) {
Find and remove redundant void argument lists.
The check converts the usage of null pointer constants (eg. NULL, 0) to
use the new C++11 nullptr keyword.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-nullptr  -header-filter=.* -fix
Finds and replaces integer literals which are cast to bool.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-bool-literals  -header-filter=.* -fix
@malaterre malaterre merged commit 115ae14 into malaterre:master Mar 16, 2020
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