ADded const qualifier to shallowCopy() method
This commit is contained in:
@@ -55,8 +55,8 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
CompletionSet * CompletionSet::shallowCopy() {
|
||||
CompletionSet * copy = new CompletionSet();
|
||||
CompletionSet * CompletionSet::shallowCopy() const {
|
||||
CompletionSet * copy = new CompletionSet();
|
||||
for (size_t ic = 0; ic < m_completions.size(); ic++) {
|
||||
CompletionConstPtr completion = m_completions[ic];
|
||||
copy->m_completions.push_back( completion );
|
||||
@@ -64,5 +64,5 @@ namespace Opm {
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Completion.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Opm {
|
||||
CompletionSet();
|
||||
void add(CompletionConstPtr completion);
|
||||
size_t size() const;
|
||||
CompletionSet * shallowCopy();
|
||||
CompletionSet * shallowCopy() const;
|
||||
CompletionConstPtr get(size_t index) const;
|
||||
private:
|
||||
std::vector<CompletionConstPtr> m_completions;
|
||||
|
||||
Reference in New Issue
Block a user