Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Tweak FixedArray and derived constructors #130

Conversation

hjmjohnson
Copy link
Member

Niels suggested the change from ValueType[Dimension] (c-type ValueType*)
to ValueType(&)[Dimension].
It is better now doubt, but it generates many breaking changes. That I
do think it could be worth to fix. The main one that is too big to
tackle right now is with all the interface of Cells.

This had to be inherited from VTK, but the interface in ITK could
enjoy a better interface than current raw pointers.
VTK does use c-arrays instead of pointers.
Compare VTK:
https://github.com/Kitware/VTK/blob/a7909e67d7df88dcf81984923296442c7ccaca5b/Common/DataModel/vtkCell.h#L197-L199
With ITK:

virtual bool EvaluatePosition(CoordRepType *,
PointsContainer *,
CoordRepType *,
CoordRepType[],
double *,
InterpolationWeightType *)
{ return bool(); }

ENH: Provide constructor from C-array to FixedArray

Also derived classes of FixedArray, inherit constructors from base.
using Superclass::Superclass
This allow to remove some repetition and homogenize the interface.

The only possible breaking change is marking as explicit two FixedArray
converting constructors:

explicit FixedArray(const ValueType & );

template< typename TFixedArrayValueType >
  explicit FixedArray(const FixedArray< TFixedArrayValueType, VLength > & r)

The template conversion is needed to avoid unexpected conversion in
derived classes. Also marking as explicit is in general a good practice.
Users might use static_cast instead of relying in the non-existant
implicit conversion.

ITK_LEGACY_FUTURE_REMOVE was used to switch between the explicit or
implicit constructor in itkVector. The switch is removed, that Vector behavior
is now handled from its base class (FixedArray).

COMP: Fix uninitialized FixedArray and const correctness

This is a false positive, the variables are not used uninitialized, but
we can solve it using the conversion constructor of FixedArray:

FixedArray(Value r[VLenght])

Also add missing const in SetNormal in LineSpatialObject

Fix warning:

Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:
In member function ‘itk::MetaTubeConverter<NDimensions>::SpatialObjectPointer itk::MetaTubeConverter<NDimensions>::MetaObjectToSpatialObject(const MetaObjectType*) [with unsigned int NDimensions = 3]’:
Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:172:3: warning: ‘point’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   m_X = newX;
   ^~~
Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:
In member function ‘itk::MetaVesselTubeConverter<NDimensions>::SpatialObjectPointer itk::MetaVesselTubeConverter<NDimensions>::MetaObjectToSpatialObject(const MetaObjectType*) [with unsigned int NDimensions = 3]’:
/home/user/Software/ITK/ITK-src/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:172:3: warning: ‘point’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   m_X = newX;

Niels suggested the change from ValueType[Dimension] (c-type ValueType*)
to `ValueType(&)[Dimension]`.
It is better now doubt, but it generates many breaking changes. That I
do think it could be worth to fix. The main one that is too big to
tackle right now is with all the interface of Cells.

This had to be inherited from VTK, but the interface in ITK could
enjoy a better interface than current raw pointers.
VTK does use c-arrays instead of pointers.
Compare VTK:
https://github.com/Kitware/VTK/blob/a7909e67d7df88dcf81984923296442c7ccaca5b/Common/DataModel/vtkCell.h#L197-L199
With ITK:
https://github.com/InsightSoftwareConsortium/ITK/blob/3a6158a416bd6f20882ac0dde27a0c1c50809991/Modules/Core/Common/include/itkCellInterface.h#L320-L326

ENH: Provide constructor from C-array to FixedArray

Also derived classes of FixedArray, inherit constructors from base.
`using Superclass::Superclass`
This allow to remove some repetition and homogenize the interface.

The only possible breaking change is marking as explicit two FixedArray
converting constructors:

```
explicit FixedArray(const ValueType & );

template< typename TFixedArrayValueType >
  explicit FixedArray(const FixedArray< TFixedArrayValueType, VLength > & r)
```

The template conversion is needed to avoid unexpected conversion in
derived classes. Also marking as explicit is in general a good practice.
Users might use static_cast instead of relying in the non-existant
implicit conversion.

ITK_LEGACY_FUTURE_REMOVE was used to switch between the explicit or
implicit constructor in itkVector. The switch is removed, that Vector behavior
is now handled from its base class (FixedArray).

COMP: Fix uninitialized FixedArray and const correctness

This is a false positive, the variables are not used uninitialized, but
we can solve it using the conversion constructor of FixedArray:

`FixedArray(Value r[VLenght])`

Also add missing const in SetNormal in LineSpatialObject

Fix warning:

```
Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:
In member function ‘itk::MetaTubeConverter<NDimensions>::SpatialObjectPointer itk::MetaTubeConverter<NDimensions>::MetaObjectToSpatialObject(const MetaObjectType*) [with unsigned int NDimensions = 3]’:
Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:172:3: warning: ‘point’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   m_X = newX;
   ^~~
Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:
In member function ‘itk::MetaVesselTubeConverter<NDimensions>::SpatialObjectPointer itk::MetaVesselTubeConverter<NDimensions>::MetaObjectToSpatialObject(const MetaObjectType*) [with unsigned int NDimensions = 3]’:
/home/user/Software/ITK/ITK-src/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx:172:3: warning: ‘point’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   m_X = newX;
```

Change-Id: If848981580a542ea70ca6bc4c4b2f212e7b33c4b
@hjmjohnson
Copy link
Member Author

http://review.source.kitware.com/#/c/23836/

Pablo He...z-Cerdan
Uploaded patch set 1.Oct 27 9:34 AM

Pablo He...z-Cerdan
Uploaded patch set 2: Commit message was updated.Oct 27 9:36 AM

Pablo He...z-Cerdan
Uploaded patch set 3.Oct 27 9:39 AM

Dzenan Zukic
Patch Set 3: Code-Review+1Oct 27 9:45 AM

Niels Dekker
Oct 27 10:33 AM

Patch Set 3:

(2 comments)

Cool! Looks like this fix allows you to declare the variables 'const', right? I would like that even better :-)

Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx
Line 78:
const PointType...?

Line 83:
const NormalType...?

Pablo He...z-Cerdan
Uploaded patch set 4.Oct 27 11:01 AM

Pablo He...z-Cerdan
Patch Set 4: If you like it, you have it! This const correction showed a missing const qualifier in SetNormal argument. Added it.Oct 27 11:03 AM

Dzenan Zukic
Patch Set 4: Code-Review+1Oct 27 11:11 AM

Kitware Build Robot
Patch Set 1: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-1&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 27 11:21 AM

Kitware Build Robot
Patch Set 3: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-3&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 27 11:29 AM

Pablo He...z-Cerdan
Patch Set 4: Code-Review-1 Ok, it is using the other conversion constructor, will try to fix it.Oct 27 11:45 AM

Kitware Build Robot
Patch Set 4: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-4&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 27 2:05 PM

Pablo He...z-Cerdan
Uploaded patch set 5.Oct 27 8:09 PM

Kitware Build Robot
Patch Set 5: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-5&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 27 9:22 PM

Pablo He...z-Cerdan
Uploaded patch set 6.Oct 28 12:06 PM

Kitware Build Robot
Patch Set 6: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-6&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 28 12:38 PM

Pablo He...z-Cerdan
Patch Set 6: All these errors, triggered by adding explicit to FixedArray conversion constructors are solvable with static_cast. The question is, what do we want to do? I find the implicit conversions to look beautiful and easy to use, but they hide too much. For example: result_vector = vector - point, it seems like a cheaper operation than it really is. There is an implicit conversion of point, from Point to Vector with the constructor Vector(const &point), and then the Vector::operator-(const Vector&) This may be unavoidable, but we can also implement a Vector::operator-(const Point &) to avoid the extra call to the constructor. Also the example of ArrayType arr = 2.0; I think an explicit ArrayType(2.0) makes it cleaner, or static_cast(2.0) will do as well. Anyway, I think explicit should be the default behaviour in FixedArray, and maybe let the more mathematical Vector, Point with the old non-explicit conversions. I will add operator-, operator+ for FixedArray of different ValueType. To save that extra constructor. But we can start the discussion.Oct 28 1:30 PM

Pablo He...z-Cerdan
Patch Set 6: Code-Review-1Oct 28 1:30 PM

Niels Dekker
Oct 28 1:58 PM

Patch Set 6:

(1 comment)

@pablo, another aspect below here, please consider:

Modules/Core/Common/include/itkFixedArray.h
Line 145:
Please note that for this declaration, 'FixedArray(const TScalarType r[VLength])', the compiler will not check the length of the argument. A user may do 'itk::FixedArray<int, 3> fixedArray = cArray', even when her 'cArray' does not have 3 elements. If you want to prefer such an error at compile-time, declare the constructor as follows:

template
FixedArray(const TScalarType (&r)[VLength])

Niels Dekker
Patch Set 6: Typo: "prefer such an error..." should be "prevent such an error..."Oct 28 2:01 PM

Pablo Hernandez-Cerdan
Oct 28 9:14 PM

Patch Set 6:

(1 comment)

Modules/Core/Common/include/itkFixedArray.h
Line 145:
It sounds good, but breaking changes, or at least propagating changes are needed. The current c syntax TScalarType[VLength] is really a TScalarType*, if we replace it by c++ syntax (with the reference), the function won't accept raw pointers anymore.

With this change, starting as early as in SetOrigin, SetSpacing in itkImageBase, propagates a bit. I think is for better, but again, good to discuss.

Thanks Niels, next patch introduces your proposed change.

Pablo He...z-Cerdan
Uploaded patch set 7.Oct 28 10:09 PM

Pablo He...z-Cerdan
Patch Set 7: This is becoming too big of a (WIP) change... I might drop Niels suggestion into another patch.Oct 28 10:11 PM

Kitware Build Robot
Patch Set 7: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=23836-7&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Oct 28 10:38 PM

Niels Dekker
Patch Set 1: @pablo It's fine by me you put my suggestion (or something similar) into another patch. I also think that it is becoming too big for a single commit. Your original itkMetaLineConverter.hxx fix from http://review.source.kitware.com/#/c/23836/1 becomes somewhat obscured by all the other changes.Oct 29 6:26 AM

Dzenan Zukic
Oct 29 8:22 AM

Patch Set 7: Code-Review+1

(4 comments)

Commit Message
Line 11:
no

Modules/Core/Common/include/itkFixedArray.h
Line 191:
to

Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx
Line 937:
Position

Modules/Registration/Metricsv4/test/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx
Line 270:
break line here

Matt McCormick
Oct 29 5:34 PM

Patch Set 7:

Cool stuff!

Breaking out into separate patches should help.

What changes can we make without breaking existing code?

@stale
Copy link

stale bot commented Mar 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Mar 6, 2019
@dzenanz
Copy link
Member

dzenanz commented Mar 6, 2019

Who was spearheading this patch?

@stale stale bot removed the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Mar 6, 2019
@dzenanz
Copy link
Member

dzenanz commented Mar 6, 2019

/azp run all

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@hjmjohnson
Copy link
Member Author

It is assigned to @phcerdan so I assume that he is the lead. I don't think it is a priority.

@thewtex thewtex added the type:Compiler Compiler support or related warnings label Mar 12, 2019
@phcerdan
Copy link
Contributor

phcerdan commented Apr 3, 2019

I am not going to tackle this in a foreseeable future. Closing as the stale bot did.

@phcerdan phcerdan closed this Apr 3, 2019
@phcerdan phcerdan added the status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline label Apr 3, 2019
@hjmjohnson hjmjohnson deleted the fix_warning_uninitialized_metaline branch October 23, 2019 13:28
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Dec 26, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (InsightSoftwareConsortium#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (InsightSoftwareConsortium#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (InsightSoftwareConsortium#131)
Fix broken MSVC builds. (InsightSoftwareConsortium#130)
Add support for quiet and signaling NaNs to the ieee header. (InsightSoftwareConsortium#128)
Move buffer and buffer_pos down (InsightSoftwareConsortium#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (InsightSoftwareConsortium#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (InsightSoftwareConsortium#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (InsightSoftwareConsortium#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (InsightSoftwareConsortium#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (InsightSoftwareConsortium#118)
Add min exponent width option in double-to-string conversion (InsightSoftwareConsortium#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (InsightSoftwareConsortium#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (InsightSoftwareConsortium#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (InsightSoftwareConsortium#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (InsightSoftwareConsortium#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (InsightSoftwareConsortium#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (InsightSoftwareConsortium#101)

Use standard min/max. (InsightSoftwareConsortium#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (InsightSoftwareConsortium#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (InsightSoftwareConsortium#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (InsightSoftwareConsortium#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (InsightSoftwareConsortium#88)

Allow for compilation in emscripten (InsightSoftwareConsortium#86)
    Support emscripten

Add test cases.
    Fixes InsightSoftwareConsortium#62

Add support of ARC architecture (InsightSoftwareConsortium#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (InsightSoftwareConsortium#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (InsightSoftwareConsortium#63)

Clarify output charset in DoubleToAscii documentation (InsightSoftwareConsortium#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (InsightSoftwareConsortium#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Dec 26, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (InsightSoftwareConsortium#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (InsightSoftwareConsortium#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (InsightSoftwareConsortium#131)
Fix broken MSVC builds. (InsightSoftwareConsortium#130)
Add support for quiet and signaling NaNs to the ieee header. (InsightSoftwareConsortium#128)
Move buffer and buffer_pos down (InsightSoftwareConsortium#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (InsightSoftwareConsortium#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (InsightSoftwareConsortium#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (InsightSoftwareConsortium#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (InsightSoftwareConsortium#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (InsightSoftwareConsortium#118)
Add min exponent width option in double-to-string conversion (InsightSoftwareConsortium#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (InsightSoftwareConsortium#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (InsightSoftwareConsortium#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (InsightSoftwareConsortium#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (InsightSoftwareConsortium#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (InsightSoftwareConsortium#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (InsightSoftwareConsortium#101)

Use standard min/max. (InsightSoftwareConsortium#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (InsightSoftwareConsortium#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (InsightSoftwareConsortium#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (InsightSoftwareConsortium#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (InsightSoftwareConsortium#88)

Allow for compilation in emscripten (InsightSoftwareConsortium#86)
    Support emscripten

Add test cases.
    Fixes InsightSoftwareConsortium#62

Add support of ARC architecture (InsightSoftwareConsortium#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (InsightSoftwareConsortium#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (InsightSoftwareConsortium#63)

Clarify output charset in DoubleToAscii documentation (InsightSoftwareConsortium#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (InsightSoftwareConsortium#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
hjmjohnson added a commit that referenced this pull request Dec 28, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (#131)
Fix broken MSVC builds. (#130)
Add support for quiet and signaling NaNs to the ieee header. (#128)
Move buffer and buffer_pos down (#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (#118)
Add min exponent width option in double-to-string conversion (#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (#101)

Use standard min/max. (#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (#88)

Allow for compilation in emscripten (#86)
    Support emscripten

Add test cases.
    Fixes #62

Add support of ARC architecture (#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (#63)

Clarify output charset in DoubleToAscii documentation (#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:Use_Milestone_Backlog Use "Backlog" milestone instead of label for issues without a fixed deadline type:Compiler Compiler support or related warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants