1. 18 Nov, 2019 1 commit
    • Kitware Robot's avatar
      clang-format: reformat using clang-format-8 · ac76fe16
      Kitware Robot authored
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 8.0.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      ac76fe16
  2. 13 Nov, 2019 1 commit
  3. 21 Mar, 2018 1 commit
    • Sean McBride's avatar
      Applied clang-tidy modernize-use-equals-default fixes · 84ec1d57
      Sean McBride authored
      This required some clean up, because the automatic changes borked a couple of files, but mostly resulted in stupid whitespacing. A few find/replace fixed things up.
      
      There are now some duplicate semis because it did changes like:
      
        ~AMRIndexIterator() override{};
      to
        ~AMRIndexIterator() override= default;;
      
      Note there was a pointless semi before, which clang-tidy didn’t expect / account for.
      
      My next commit will remove them.
      84ec1d57
  4. 26 Jul, 2017 1 commit
    • Kitware Robot's avatar
      Replace many NULL and 0 occurances with nullptr · a855cab0
      Kitware Robot authored
      This topic is the result of running clang-tidy to
      modernize our usage of NULL and 0 to nullptr. It also
      includes some manual and semi manual changes where
      clang-tidy would not be expected to work (such as in
      comments, or classes not compiled on this build)
      
      There are definitely many comments and occurances that
      this topic misses that we will need to fix over time.
      a855cab0
  5. 03 Oct, 2016 1 commit
    • David C. Lonie's avatar
      Refactor vtkDebugLeaks construction. · e5c793db
      David C. Lonie authored
      vtkDebugLeaks registers instance by class name, which worked well for
      many years. However, now that we have more templated code, this is
      becoming difficult. For instance, "template <typename T> vtkBuffer<T>"
      would be identified as "vtkBuffer<T>" when registering with
      vtkDebugLeaks, but deregistered with the compiler dependent
      typeid(vtkBuffer<T>).name() string returned from GetClassName().
      
      This patch moves vtkDebugLeaks registrations to the method
      vtkObjectBase::InitializeObjectBase(), which must be called after the
      vtkObjectBase is instantiated. This ensures that objects are
      registered using the same string as when they are destroyed. In
      general, a call to "new vtkSomeClass" must be followed by a call to
      InitializeObjectBase on the new instance. The common ::New()
      implementation macros in vtkObjectFactory will ensure that
      registration happens correctly.
      
      Two notable exceptions are vtkCommand and vtkInformationKey
      subclasses. These do not require any specific handling for
      vtkDebugLeaks registration.
      
      See discussion at:
      
      http://vtk.1045678.n5.nabble.com/Proposal-Simplify-vtkDebugLeaks-registration-td5740222.html
      e5c793db
  6. 23 Sep, 2016 1 commit
    • Kitware Robot's avatar
      Reindent using the reindentation script. · f830ff47
      Kitware Robot authored
      This commit reindents the code with the following utility:
      Utilities/Maintenance/vtk-reindent-code.py
      
      This utility changes the positions of the braces so that they are no
      longer indented relative to the code block they reside in.
      
      The bash command line used was the following:
      
      for d in Charts Common Deprecated Domains Examples Filters GUISupport \
               Geovis IO Imaging Infovis Interaction Parallel Rendering \
               Testing Views Web Wrapping; do
        for e in cxx cxx.in txx txx.in hxx hxx.in h h.in c c.in; do
          find "${d}" -name "*.${e}" -exec \
            python Utilities/Maintenance/vtk_reindent_code.py {} +
        done
      done
      f830ff47
  7. 08 Mar, 2016 1 commit
  8. 16 Sep, 2015 1 commit
  9. 14 May, 2015 1 commit
  10. 06 Aug, 2014 1 commit
    • Ben Boeckel's avatar
      warnings: use floating point intermediate values · 37aad40d
      Ben Boeckel authored
      When calculating values which are, at the end, integers, the
      intermediate values may have some nuance to them where floating point
      can help precision.
      
      Change-Id: I4b9cd14f80b74200ae4fde1369a51c5d4275cd18
      37aad40d
  11. 09 Jul, 2014 1 commit
  12. 29 Oct, 2013 1 commit
  13. 10 Apr, 2013 1 commit
    • David Thompson's avatar
      Use scalar annotations on interval-mode scalar bar. · 55cb7e11
      David Thompson authored
      This commit renders user-provided notes associated with specific
      scalar values on the interval-mode scalar bar. Previously, only
      the categorical mode rendered these annotations.
      
      Also, provide the scalar bar with an optional swatch
      to illustrate the color assigned to NaN values.
      
      Add an option to color leader lines from the scalar bar to
      the annotation labels by the corresponding scalar value.
      
      This commit also breaks the process of rebuilding the scalar bar
      into several virtual methods so that subclasses (particularly
      ParaView's `vtkPVScalarBarActor`) can reuse more of the base class
      functionality. The process is now separated into 2 phases: layout,
      where bounding boxes for scalar bar components are placed; and
      configuration, where actors are positioned and geometry is created.
      This includes some changes to text actor to support constrained
      placement and text size queries.
      
      Add a test for the new scalar bar options.
      There are now many more options controlling how the scalar bar behaves.
      In particular many settings interact with the way geometry is rendered:
      the lookup table may be indexed or not (thus tick marks may not be
      rendered); the orientation may be horizontal or vertical; annotations
      may be rendered or not; the NaN annotation may be omitted; leader lines
      to annotations may be colored by the scalar they annotate or by the label
      color; and the tick marks may precede or succeed the scalar bar.
      Also, we must test how empty labels are handled and how even vs odd
      numbers of labels affect placement (since the algorithm for placement
      behaves differently in these cases).
      
      We cannot perform a full factorial test, but do test independent
      configurations.
      
      Finally, this commit improves the performance of prominent value
      detection for primitive-type arrays (e.g., int, double) by avoiding
      the use of vtkVariant instances to hold the working set of distinct
      values during sampling.
      
      Change-Id: I852f9b497d5e6ab619d9d7b763f641c44e4869cf
      55cb7e11
  14. 13 Dec, 2012 1 commit
    • David C. Lonie's avatar
      Add GetConstrainedFontSize to FTTools and MTUtilities. · 5c14d896
      David C. Lonie authored
      Add a method to compute the font size needed to make text rendered
      by FreeTypeTools or MathTextUtilities fill a specified rectangle.
      The documentation of vtkTextMapper::GetConstrainedFontSize is
      clarified, too.
      
      Change-Id: I39de26b5173153eaec9e8f5f2857fe9964bad768
      
      s constrained -- add note about updated docs for tmapper
      
      Change-Id: Ib8c042285aabc719fe57825c05d85b6ab2b59c4b
      5c14d896
  15. 19 Oct, 2012 1 commit
  16. 31 Jul, 2012 2 commits
    • David C. Lonie's avatar
      Add API to generate vtkPath data and colored images from MathText. · a50a557c
      David C. Lonie authored
      * Add API to produce a vtkPath representing contours of math text.
      * The vtkMathTextUtilities API now accepts vtkTextProperties to
        set colors, font size, etc.
      * Make MathTextUtilities abstract (The matplotlib module overrides
        this class in a later commit)
      * Remove python dep from vtkMathText.
      
      Change-Id: Id4d9fb91be831673d13b865802c24f230f263820
      a50a557c
    • Brad King's avatar
      Python: Remove POSIX feature macro 'undef' workarounds · 0c8d479c
      Brad King authored
      Inclusion of "Python.h" defines POSIX feature macros to tell system
      headers what features it needs.  These may include macros such as
      
       _LARGEFILE_SOURCE
       _POSIX_C_SOURCE
       _POSIX_THREADS
       _THREAD_SAFE
       _XOPEN_SOURCE
      
      Definition of any feature macro before including "Python.h" produces
      macro re-definition warnings in the Python headers.  System headers
      often define default feature macros, so include order is important.
      
      VTK has made many attempts to work around re-definition warnings by
      "#undef"-ing feaure macros it expectes "Python.h" to define:
      
       commit 942a90eb (Remove warning when posix threads is defined, 2003-05-13)
       commit 631e400b (Fix the order of including for sun to compile, 2003-06-24)
       commit 76e6536e (Python2.3 requires this order of includes to compile, 2003-08-27)
       commit b203dfbc (fix for aix include file ordering, 2004-01-20)
       commit e7efd0df (Another attempt to fix Python.h macro conflicts, 2004-01-21)
       commit 082885d3 (Work-around for _POSIX_C_SOURCE redefinition warning, 2007-02-05)
       commit 0a9b0246 (fix redefinition in vtkParaPythonAppInit.cxx, 2010-09-20)
       commit 00374dad (Another attempt to fix vtkPython.h redefinitions, 2010-09-21)
       commit ea3fd719 (Revert the attempt to avoid redefinition warnings, 2010-09-21)
       commit b8d913a3 (vtkPython - Undefine _XOPEN_SOURCE to avoid redefinition warning, 2011-06-16)
       commit 0731d79e (Add vtkPythonConfigure.h with python-related config info, 2011-07-06)
       commit 7dbefe0b (Rearrange vtkPython.h, add more undef's to fix warnings, 2011-07-07)
      
      but this leads to inconsistent feature definitions if some system
      headers are included before such workarounds and others after them.
      
      The Python documentation clearly states the proper approach:
      
       "Since Python may define some pre-processor definitions which
        affect the standard headers on some systems, you must include
        Python.h before any standard headers are included."
       (http://docs.python.org/c-api/intro.html#include-files)
      
      Drop all previous workarounds.  Include "vtkPython.h" prior to any
      system header in all translation units that need Python.
      
      Change-Id: Ibabd60c0b40163a92659e7003827c1a09bfae770
      0c8d479c
  17. 10 Jul, 2012 1 commit
  18. 02 Jul, 2012 1 commit