- 11 Sep, 2018 3 commits
-
-
Cédric Traizet authored
-
Cédric Traizet authored
-
Cédric Traizet authored
-
- 10 Sep, 2018 3 commits
-
-
Cédric Traizet authored
-
Cédric Traizet authored
-
Cédric Traizet authored
-
- 07 Sep, 2018 1 commit
-
-
Cédric Traizet 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)
-
- 12 Jul, 2018 1 commit
-
-
Laurentiu Nicola authored
find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/([^<])vcl_(adjacent_find|and|binary|binary_search|copy|copy_|count|count_if|equal|equal_range|fill|fill_n|find|find_end|find_first_of|find_if|for_each|generate|generate_n|generators_|heap|includes|inplace_merge|iter_swap|lexicographical_compare|lower_bound|make_heap|max|min|max_element|merge|merge_|min_element|mismatch|next_permutation|nth_element|partial_sort|partial_sort_copy|partition|stable_partition|partitions_|pop_heap|prev_permutation|push_heap|random_shuffle|remove|remove_copy|remove_copy_if|remove_if|replace|replace_copy|replace_copy_if|replace_if|reverse|reverse_copy|rotate|rotate_copy|search|search_n|set_difference|set_intersection|set_symmetric_difference|set_union|sort|sort_|sort_heap|stable_sort|swap|swap_|swap_ranges|transform|unique|unique_copy|upper_bound|bitset|abs|acos|asin|atan|atan2|ceil|cos|cosh|exp|fabs|floor|fmod|frexp|ldexp|log|log10|modf|pow|sin|sinh|sqrt|tan|tanh|complex|real|imag|arg|norm|conj|polar|jmp_buf|longjmp|sig_atomic_t|raise|signal|va_list|ptrdiff_t|size_t|FILE|fpos_t|fopen|fclose|feof|ferror|fflush|fgetc|fgetpos|fgets|fwrite|fread|fseek|ftell|perror|clearerr|rename|fputc|fputs|freopen|fsetpos|getc|getchar|gets|putc|putchar|puts|rewind|setbuf|setvbuf|tmpfile|tmpnam|ungetc|printf|sprintf|fprintf|vprintf|vsprintf|vfprintf)/\1std::\2/g" find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/<<vcl_log/<<std::log/g"
-
- 25 Jun, 2018 2 commits
-
-
Manuel Grizonnet authored
-
Manuel Grizonnet authored
OTB followed since the beginning the ITK convention and use .txx extension for all template classes. Nevertheless, some development tools do not recognize .txx file extension. Other tool like GitHub can't do in-browser syntax highlighting for txx files I think. The root problem is the use of the txx which should be changed to hxx (or hpp). In 2011, after an in-depth discussion near April 20, 2011 on the Insight-Developers mailing list, ITK rename all txx files to hxx (and event prevent the push of .txx files with a pre-commit hook). It happens is major release v4. You can find some arguments in the discussion about the change and also in other projects related to ITK which applied the same modification, see for instance VXL: https://github.com/vxl/vxl/issues/209 This commit apply now the same modification for OTB. I understand that it will change some habit for developers and don't bring new features but I think that in general it is better to stay align with ITK guidelines. In my opinion, it always facilitate the use of OTB and ITK together if we share when we can the same code architecture, directory organization, naming conventions...
-
- 07 Jun, 2018 2 commits
-
-
Victor Poughon authored
-
Victor Poughon authored
-
- 23 Apr, 2018 2 commits
-
-
remi cresson authored
-
remi cresson authored
-
- 20 Apr, 2018 1 commit
-
-
remi cresson 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' {} +)
-
- 22 Jan, 2018 1 commit
-
-
Antoine Regimbeau authored
-
- 01 Nov, 2017 1 commit
-
-
Laurentiu Nicola authored
-
- 31 Oct, 2017 1 commit
-
-
Antoine Regimbeau authored
-
- 27 Oct, 2017 1 commit
-
-
Antoine Regimbeau authored
-
- 25 Oct, 2017 1 commit
-
-
Antoine Regimbeau authored
-
- 08 Mar, 2017 2 commits
-
-
Sébastien Dinot authored
-
Sébastien Dinot authored
-
- 15 Sep, 2016 1 commit
-
-
Manuel Grizonnet authored
-
- 22 Aug, 2016 1 commit
-
-
Guillaume Pasero authored
-
- 20 Jul, 2016 3 commits
-
-
Guillaume Pasero authored
-
Guillaume Pasero authored
-
Guillaume Pasero authored
-
- 16 Jun, 2016 1 commit
-
-
Manuel Grizonnet authored
Where available, use c++11 features to identify potential nullptr usage errors. 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-nullptr -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/Modules/*/*/app/*.cxx ~/projets/otb/src/OTB/Examples/*/*.cxx ~/projets/otb/src/OTB/Modules/*/*/test/*.cxx > ~/temporary/run-clang-tidy-nullptr-log.txt find . -type f -print -name "*.h" -o -name "*.txx" -o -name "*.cxx" |xargs perl -pi -e 's/nullptr/ITK_NULLPTR/g'
-
- 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'
-
- 19 May, 2016 1 commit
-
-
Guillaume Pasero authored
-
- 29 Mar, 2016 1 commit
-
-
Rashad Kanavath authored
This patch is authored by Bas Couwenberg <sebastic@xs4all.nl> from DebianGIS team. spelling errors were encountered when updating OTB debian package for 5.2.1. https://bugs.orfeo-toolbox.org/view.php?id=1143
-
- 21 Mar, 2016 1 commit
-
-
Guillaume Pasero authored
-
- 18 Mar, 2016 1 commit
-
-
Guillaume Pasero authored
-
- 03 Feb, 2016 1 commit
-
-
Manuel Grizonnet authored
-
- 05 Jan, 2016 1 commit
-
-
Guillaume Pasero authored
-
- 04 Jan, 2016 1 commit
-
-
Rashad Kanavath authored
This is a big one without much harm. It fixes incorrect spelling and grammer when packaging OTB 5.0.0 and 5.2.0 for Debian. Most of these changes are done by developers at DebianGIS. For more info, I include the original patch header below. Description: Fix some spelling errors to silence lintian enabling to concentrate on the real problem. Author: Andreas Tille <tille@debian.org> Author: Rashad Kanavath <rashad.kanavath@c-s.fr> Author: Bas Couwenberg <sebastic@xs4all.nl> Last-Update: 2015-12-22
-
- 13 Oct, 2015 1 commit
-
-
Julien Michel authored
-