- 09 May, 2019 1 commit
-
-
Cédric Traizet authored
-
- 03 May, 2019 2 commits
-
-
Cédric Traizet authored
-
Cédric Traizet authored
-
- 29 Apr, 2019 1 commit
-
-
Victor Poughon authored
-
- 29 Mar, 2019 1 commit
-
-
Guillaume Pasero authored
-
- 26 Mar, 2019 1 commit
-
-
ctraizet authored
-
- 08 Mar, 2019 2 commits
-
-
Victor Poughon authored
-
ctraizet authored
-
- 04 Mar, 2019 1 commit
-
-
Victor Poughon authored
-
- 14 Jan, 2019 1 commit
-
-
Julien Michel authored
-
- 30 Nov, 2018 1 commit
-
-
Victor Poughon authored
-
- 12 Nov, 2018 1 commit
-
-
Guillaume Pasero authored
-
- 25 Jul, 2018 1 commit
-
-
Julien Michel authored
-
- 19 Jul, 2018 2 commits
-
-
Julien Michel authored
-
Victor Poughon authored
-
- 18 Jul, 2018 3 commits
-
-
Julien Michel authored
-
Victor Poughon authored
This was done with this script: #!/bin/bash set -eou pipefail # Use C++11 sstream constructor from string # Exclude 'ThirdParty' because it uses ossimFilename type find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/std::ifstream (.*)\((.*)\.c_str\(\)/std::ifstream \1\(\2/" find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/std::ofstream (.*)\((.*)\.c_str\(\)/std::ofstream \1\(\2/" # Use C++11 ::open(const std::string&) of ifstream, ofstream, etc. # Exclude ThirdParty because of ossimFilename type find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/\.open\((.*).c_str\(\)/\.open\(\1/" # No need for c_str when outputing to std::cout and such find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/\.c_str\(\) ?<</ <</" # Use itk::ExceptionObject::SetDescription and SetLocation string versions find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/e\.SetDescription\((.*)\.c_str\(\)\)/e\.SetDescription\(\1\)/" find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/e\.SetLocation\((.*)\.c_str\(\)\)/e\.SetLocation\(\1\)/" # Use itksys::SystemTool:: string versions find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/itksys::SystemTools::(.*)\((.*)\.c_str\(\)/itksys::SystemTools::\1\(\2/" # Exclude otbLogger because it uses GetCurrentDateTime which does not have a string version git checkout -- Modules/Core/Common/src/otbLogger.cxx # Exclude test/otbOGRLayerStreamStitchingFilter.cxx because there's a double use which is not compatible with the regex git checkout -- Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx
-
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 6 commits
-
-
Julien Michel authored
-
Julien Michel authored
-
Julien Michel authored
-
Julien Michel authored
-
Julien Michel authored
-
Julien Michel authored
-
- 07 Jun, 2018 2 commits
-
-
Victor Poughon authored
-
Victor Poughon authored
-
- 03 May, 2018 1 commit
-
-
Antoine Regimbeau authored
-
- 17 Apr, 2018 1 commit
-
-
Julien Michel authored
-
- 03 Apr, 2018 1 commit
-
-
Rashad Kanavath authored
-
- 30 Mar, 2018 1 commit
-
-
Manuel Grizonnet 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' {} +)
-
- 21 Feb, 2018 1 commit
-
-
Antoine Regimbeau authored
-
- 16 Feb, 2018 1 commit
-
-
Guillaume Pasero authored
-
- 06 Feb, 2018 2 commits
-
-
Antoine Regimbeau authored
-
Antoine Regimbeau authored
-
- 08 Nov, 2017 1 commit
-
-
Guillaume Pasero authored
-
- 07 Nov, 2017 1 commit
-
-
Guillaume Pasero authored
-
- 11 Oct, 2017 1 commit
-
-
Victor Poughon authored
-
- 02 Oct, 2017 2 commits
-
-
Julien Michel authored
-
Julien Michel authored
-