Ticket #1297 (closed: fixed)
Create a single definition of unSetInt
Reported by: | Peter Peterson | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 26 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Michael Whitty |
Description
A quick search of the source code shows lots of definitions of
///a flag int value to indicate that the value wasn't set by users static const int unSetInt = INT_MAX-15;
which frequently copy even the comment. This should be set as a global constant somewhere in the Property hierarchy.
Change History
comment:2 Changed 10 years ago by Peter Peterson
This ticket should remain open for the bit of work involved in moving the other references to use the centralized one.
comment:4 Changed 10 years ago by Janik Zikovsky
- Owner set to Janik Zikovsky
- Status changed from new to accepted
- Component set to Mantid
I can finish this one...
comment:6 Changed 10 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
comment:7 Changed 10 years ago by Michael Whitty
- Status changed from verify to verifying
- Tester set to Michael Whitty
comment:8 Changed 10 years ago by Michael Whitty
- Status changed from verifying to reopened
- Resolution fixed deleted
- Milestone changed from Iteration 25 to Iteration 26
there are still several occurances of the old unSetInt in various forms hanging around to clean up after the release.
Find all "INT_MAX-15", Match case, Subfolders, Find Results 1, "C:\MANTID\Code\Mantid\", "*.cpp;*.h" C:\MANTID\Code\Mantid\includes\MantidAlgorithms\CropWorkspace.h(105): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidAlgorithms\DetectorEfficiencyCor.h(134): static const int UNSETINT = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidAlgorithms\DetectorEfficiencyVariation.h(112): static const int UNSETINT = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidAlgorithms\MedianDetectorTest.h(129): static const int UNSETINT = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadDAE.h(124): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadRaw.h(112): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadRaw2.h(118): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadRaw3.h(140): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadRawBin0.h(108): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidDataHandling\LoadRawHelper.h(182): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidNexus\LoadISISNexus.h(164): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidNexus\LoadNeXus.h(104): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidNexus\SaveNeXus.h(88): static const int unSetInt = INT_MAX-15; C:\MANTID\Code\Mantid\includes\MantidNexus\SaveNexusProcessed.h(90): static const int unSetInt = INT_MAX-15; Matching lines: 14 Matching files: 14 Total files searched: 1727
comment:10 Changed 10 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
I think those files in the "Code\Mantid\includes" are copied there by one of the build systems (scons?) and those were old versions Michael was seeing. I don't have any unSetInt.
comment:12 Changed 10 years ago by Michael Whitty
- Status changed from verifying to closed
apologies, you are right. don't know how they got there, as I've never used scons on this machine.
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2144
We have a global definition already - see EMPTY_INT() in System.h/cpp
It's true that all these local ones could go though. I don't know what the reason for the magic 15 is - probably it's no good reason.