diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-22 20:24:16 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-02 13:53:23 -0700 |
commit | a3d8191896c86fd05b96d38371f89f6d6f621789 (patch) | |
tree | e3048f9a75b155f58929a2611e6582a4773fc2ff /desktop-widgets | |
parent | ed8ad9ac807624b9fb87076e8a41cc2e47a5b076 (diff) | |
download | subsurface-a3d8191896c86fd05b96d38371f89f6d6f621789.tar.gz |
profile: make ItemPos initialization constant
The ItemPos structure describes the position of various chart
elements on the scene. It had two problems:
- The identifiers were starting with an underscore followed
by a capital letter. This is reserved to the compiler.
- The global object was initialized in the ProfileWidget's
constructor. This means that if there are multiple
ProfileWidgets, the structure is reinitialized even though
it is constant.
Remove the underscores (what was the point anyway?) and
initialize the structure in its own constructor. Moreover,
make the object const to drive the point home.
If this ever needs to be variable, each ProfileWidget
should get its own copy of the object.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
0 files changed, 0 insertions, 0 deletions