Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
e3f8e3ff
Commit
e3f8e3ff
authored
Nov 10, 2017
by
Simon Heybrock
Browse files
Re #0. Remove useless log cache that bypasses COW mechanism.
parent
b0a908bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h
View file @
e3f8e3ff
...
...
@@ -283,11 +283,6 @@ private:
/// Coordinates
Kernel
::
SpecialCoordinateSystem
m_coordSystem
;
// adapter for logs() function, which create reference to this class itself
// and does not allow to delete the shared pointers,
// returned by logs() function when they go out of scope
API
::
LogManager_sptr
m_logCash
;
};
/// Typedef for a shared pointer to a peaks workspace.
...
...
Framework/DataObjects/src/PeaksWorkspace.cpp
View file @
e3f8e3ff
...
...
@@ -877,15 +877,9 @@ PeaksWorkspace::getSpecialCoordinateSystem() const {
struct
NullDeleter
{
template
<
typename
T
>
void
operator
()(
T
*
)
{}
};
/**Get access to shared pointer containing workspace porperties, cashes the
shared pointer
into internal class variable to not allow shared pointer being deleted */
/**Get access to shared pointer containing workspace porperties */
API
::
LogManager_sptr
PeaksWorkspace
::
logs
()
{
if
(
m_logCash
)
return
m_logCash
;
m_logCash
=
API
::
LogManager_sptr
(
&
(
this
->
mutableRun
()),
NullDeleter
());
return
m_logCash
;
return
API
::
LogManager_sptr
(
&
(
this
->
mutableRun
()),
NullDeleter
());
}
/** Get constant access to shared pointer containing workspace porperties;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment