Skip to content
Snippets Groups Projects
  1. Jul 18, 2018
    • Victor Poughon's avatar
      COMP: add missing string includes · fc923078
      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)
      fc923078
    • Julien Michel's avatar
      Merge branch '1649-fstream-and-iostream-cleanup' into 'develop' · 205fd8d8
      Julien Michel authored
      fstream and iostream clean-up
      
      See merge request orfeotoolbox/otb!171
      205fd8d8
    • Victor Poughon's avatar
      Merge branch 'enhance_mapfromlabelstats' into 'develop' · a7d3e7ec
      Victor Poughon authored
      Enhance StreamingStatisticsMapFromLabelImageFilter
      
      See merge request orfeotoolbox/otb!59
      a7d3e7ec
  2. Jul 17, 2018
  3. Jul 16, 2018
  4. Jul 13, 2018
  5. Jul 12, 2018
    • Julien Michel's avatar
      ENH: Remove empty destructor · 63ef6d11
      Julien Michel authored
      63ef6d11
    • Julien Michel's avatar
      Revert "STY: Use default constructor/destructor" · bf05518d
      Julien Michel authored
      This reverts commit 73b61450.
      bf05518d
    • Julien Michel's avatar
      STY: Use default constructor/destructor · 73b61450
      Julien Michel authored
      73b61450
    • Laurențiu Nicola's avatar
      Merge branch 'de-vcl-math' into 'develop' · 93d1d04e
      Laurențiu Nicola authored
      ENH: Use std math instead of vcl
      
      Closes #1667
      
      See merge request !163
      93d1d04e
    • Laurențiu Nicola's avatar
    • Laurențiu Nicola's avatar
      ENH: Remove vcl_deprecated_header.h includes · 7c99d0d2
      Laurențiu Nicola authored
      find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "/#include <vcl_deprecated_header.h>/d"
      7c99d0d2
    • Laurențiu Nicola's avatar
      ENH: Use std::complex instead of vcl_complex · 72cb66ce
      Laurențiu Nicola authored
      find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/vcl_complex/std::complex/g"
      72cb66ce
    • Laurențiu Nicola's avatar
      ENH: Use std instead of vcl headers · eb259c64
      Laurențiu Nicola authored
      find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/vcl_(algorithm|complex|cmath)\.h/\1/g"
      
      find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/std::complex\.h/complex/g"
      
      find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri 's/#include "(algorithm|cmath|complex)"/#include <\1>/g'
      eb259c64
    • Laurențiu Nicola's avatar
      ENH: Use math functions in std:: instead of vcl · fcbf830b
      Laurențiu 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"
      fcbf830b
  6. Jul 11, 2018
  7. Jul 10, 2018
  8. Jul 09, 2018
  9. Jul 07, 2018
  10. Jul 06, 2018
Loading