View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002137 | OpenFOAM | Bug | public | 2016-07-01 07:12 | 2016-07-01 14:54 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | any | OS | any | OS Version | any |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0002137: inconsistencies in unsigned primitives | ||||
Description | By design, or by mistake, the unsigned versions have the same pTraits limits as their signed counterparts? In uint32.C, uint64.C: const uint64_t Foam::pTraits<uint64_t>::min = INT64_MIN; const uint64_t Foam::pTraits<uint64_t>::max = INT64_MAX; const uint32_t Foam::pTraits<uint32_t>::min = INT32_MIN; const uint32_t Foam::pTraits<uint32_t>::max = INT32_MAX; STYLE: uLabel.H includes the zero-sized file "uLabelSpecific.H", which should be removed as clutter. | ||||
Tags | No tags attached. | ||||
|
Any good reason not to hard-code the min values as 0 instead of using macros for the same? I can't think of any situation where an unsigned type can have a min value that is not zero. |
|
Resolved by commit c488c0208259f843dde129fcd7a6e3566aef0ee8 |
|
Thanks. On the same cleanup level, I think it would make sense to reduce other cruft. In int32.H and uint32.H, remove the now superfluous UINT32_MIN defines. Also hard-code the rootMin values const uint32_t Foam::pTraits<uint32_t>::rootMin = 0; const uint64_t Foam::pTraits<uint64_t>::rootMin = 0; |
|
Resolved by commit 97a889dbd8398323bb8c66c7743c75c5428ea726 |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-07-01 07:12 |
|
New Issue | |
2016-07-01 07:16 |
|
Note Added: 0006479 | |
2016-07-01 10:37 | henry | Note Added: 0006481 | |
2016-07-01 10:37 | henry | Status | new => resolved |
2016-07-01 10:37 | henry | Fixed in Version | => dev |
2016-07-01 10:37 | henry | Resolution | open => fixed |
2016-07-01 10:37 | henry | Assigned To | => henry |
2016-07-01 10:44 |
|
Note Added: 0006483 | |
2016-07-01 10:44 |
|
Status | resolved => feedback |
2016-07-01 10:44 |
|
Resolution | fixed => reopened |
2016-07-01 14:54 | henry | Note Added: 0006486 | |
2016-07-01 14:54 | henry | Status | feedback => resolved |
2016-07-01 14:54 | henry | Resolution | reopened => fixed |