- 03 May, 2019 1 commit
-
-
Cédric Traizet authored
-
- 08 Mar, 2019 1 commit
-
-
ctraizet authored
-
- 14 Jan, 2019 1 commit
-
-
Julien Michel authored
-
- 18 Jul, 2018 1 commit
-
-
Victor Poughon authored
Before this commit, many files are using std::string without including <string>. It can work accidentally but causes issues when refactoring, especially if using operator <<() which is included implicitly by some compilers. To find guilty header files, I used: grep -l "^ *std::string" $(grep -L "#include <string>" $(find . -type f -name "*.h")) which finds all files containing "std::string" at the beginning of a line (usually a member or variable declaration), but not "#include <string>". And then this script to add the includes (plus some manual ediing): #!/usr/bin/env python3 import re import argparse def fix_file(filename, header): with open(filename, "r") as f: content = f.read() matches = list(re.finditer(r"(#include .*\n)\n", content)) if len(matches) == 0: print("no include!") sys.exit(-1) pos = matches[-1].end(1) open(filename, "w").write(content[:pos] + "#include <{}>\n".format(header) + content[pos:]) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--header', type=str, required=True) parser.add_argument('files', type=str, nargs='+') args = parser.parse_args() for filename in args.files: fix_file(filename, args.header)
-
- 20 Jun, 2018 2 commits
-
-
Julien Michel authored
-
Julien Michel authored
-
- 07 Jun, 2018 1 commit
-
-
Victor Poughon authored
-
- 12 Mar, 2018 1 commit
-
-
Julien Michel authored
STY: Change ITK_OVERRIDE for override in whole code (find Modules -type f -exec sed -i 's/ITK_OVERRIDE/override/g' {} +)
-
- 27 Jun, 2017 1 commit
-
-
Julien Michel authored
-
- 19 Jun, 2017 1 commit
-
-
Julien Michel authored
-
- 18 May, 2017 1 commit
-
-
Victor Poughon authored
-
- 05 Apr, 2017 1 commit
-
-
Guillaume Pasero authored
-
- 08 Mar, 2017 2 commits
-
-
Sebastien Dinot authored
-
Sebastien Dinot authored
-
- 15 Sep, 2016 1 commit
-
-
Manuel Grizonnet authored
-
- 13 Jun, 2016 1 commit
-
-
Manuel Grizonnet authored
Used the following command: find . \( -iname *.txx -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/__otb(.*)_txx/otb$1_txx/g;' {} \; find . \( -iname *.h -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/__otb(.*)_h/otb$1_h/g;' {} \; Fixes many, but not all, clang -Wreserved-id-macro warnings.
-
- 10 Jun, 2016 1 commit
-
-
Manuel Grizonnet authored
clang-tidy tool can insert missing override keyword as a macro so that missing [optional] virtual identifiers can be easily added. build otb with clang 3.8 and use cmake option CMAKE_EXPORT_COMPILE_COMMANDS=ON. Most modules and third parties have been activated. #Save override occurences in otb code cd src/Modules ; grep -nR "override" * > ~/temporary/override_otb.txt #Run clang modernize check using utility script which allow to process the code in parallel python run-clang-tidy.py -clang-tidy-binary ~/software/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-tidy -checks=-*,modernize-use-override -header-filter=/home/grizonnetm/projets/otb/src/OTB/Modules/.*/.*/include/.* -j8 -fix -p ~/projets/otb/bin/release/OTB-clang3.8/ ~/projets/otb/src/OTB/Modules/*/*/src/*.cxx ~/projets/otb/src/OTB/Examples/*/*.cxx ~/projets/otb/src/OTB/Modules/*/*/test/*.cxx > ~/temporary/run-clang-tidy-log.txt #Replace override by ITK macro (to maintain compat with c++98) find . -type f -print -name "*.h" -o -name "*.txx" |xargs perl -pi -e 's/\ override/\ ITK_OVERRIDE/g'
-
- 27 Feb, 2015 1 commit
-
-
Manuel Grizonnet authored
-
- 18 Feb, 2015 2 commits
-
-
Julien Malik authored
-
Julien Malik authored
-