Cannot have a const pointer returned to the pool

This commit is contained in:
Eric Harding committed 2019-03-29 15:38:54 -04:00
1 parent a4575e3fa3
commit ad6fc6d23b
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -62,7 +62,7 @@ void MBOWriter::publish_snapshot(SecurityKey key, MBOSnapshot* snapshot) {
MBOReader::MBOReader(std::shared_ptr<MBOProcessorImpl>& me): _me(me) { }
MBOReader::~MBOReader() { }
const MBOSnapshot* MBOReader::acquire_snapshot(SecurityKey key) const {
MBOSnapshot* MBOReader::acquire_snapshot(SecurityKey key) const {
// get a result eagerly so we don't have to do it while accessor has the entry locked
auto result = _me->pool.allocate();
MapType::const_accessor accessor;
@@ -74,7 +74,7 @@ const MBOSnapshot* MBOReader::acquire_snapshot(SecurityKey key) const {
}
return result;
}
void MBOReader::release_snapshot(MBOSnapshot**const s) const {
void MBOReader::release_snapshot(MBOSnapshot**s) const {
_me->pool.release(s);
}