Ticket #8563 (closed: fixed)
ScopedWorkspace: fix problems with bool() operator.
Reported by: | Arturs Bekasovs | Owned by: | Arturs Bekasovs |
---|---|---|---|
Priority: | major | Milestone: | Release 3.1 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Andrei Savici |
Description
According to boost 1.5.3. documentation: "Smart pointers now use explicit operator bool on C++11 compilers. This can break code that passes a smart pointer to a function taking a bool, or that returns a smart pointer from a function with a bool return type. Please use p != 0 or !!p in such cases. "
And, actually, should just return the result of doesExist(), as (theoretically) null workspaces shouldn't be in the ADS. To be sure about that, appropriate unit test for ADS should be added.
Change History
comment:2 Changed 7 years ago by Arturs Bekasovs
Refs #8563. Re-factore bool() operator of ScopedWorkspace.
Now that we can be sure there can not be any null pointers in the ADS, it becomes as simple as just checking whether workspace exists in the ADS.
Changeset: 6bf4bd1a7cc1b96b9d95a60fcbd76e7037adb941
comment:3 Changed 7 years ago by Arturs Bekasovs
Tester:
There should not be any functionality changes. Make sure you agree with what was done and that appropriate unit tests cover the code. Check that the code compiles correctly with boost 1.53.0 (which did report an error before these changes).
comment:4 Changed 7 years ago by Arturs Bekasovs
- Status changed from inprogress to verify
- Resolution set to fixed
comment:5 Changed 7 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici
comment:6 Changed 7 years ago by Andrei Savici
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/8563_scoped_ws_bool'
Full changeset: 8b1001adad12617449aadf58fd83a27614022cc9
Refs #8563. Additional test for ADS.
Changeset: 5c4566bef31af78b2ff72b1e61e06926abb94e5f