Use constant grid in output writing
Grid manager returns a const UnstructuredGrid*, and the entire chain of pointer-passing glory should adhere to this const-ness.
This commit is contained in:
@@ -47,7 +47,7 @@ private:
|
||||
template <typename Format> unique_ptr <OutputWriter>
|
||||
create (const ParameterGroup& params,
|
||||
std::shared_ptr <EclipseGridParser> parser,
|
||||
std::shared_ptr <UnstructuredGrid> grid) {
|
||||
std::shared_ptr <const UnstructuredGrid> grid) {
|
||||
return unique_ptr <OutputWriter> (new Format (params, parser, grid));
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ create (const ParameterGroup& params,
|
||||
typedef map <const char*, unique_ptr <OutputWriter> (*)(
|
||||
const ParameterGroup&,
|
||||
std::shared_ptr <EclipseGridParser>,
|
||||
std::shared_ptr <UnstructuredGrid>)> map_t;
|
||||
std::shared_ptr <const UnstructuredGrid>)> map_t;
|
||||
map_t FORMATS = {
|
||||
{ "output_ecl", &create <EclipseWriter> },
|
||||
};
|
||||
@@ -70,7 +70,7 @@ map_t FORMATS = {
|
||||
unique_ptr <OutputWriter>
|
||||
OutputWriter::create (const ParameterGroup& params,
|
||||
std::shared_ptr <EclipseGridParser> parser,
|
||||
std::shared_ptr <UnstructuredGrid> grid) {
|
||||
std::shared_ptr <const UnstructuredGrid> grid) {
|
||||
// allocate a list which will be filled with writers. this list
|
||||
// is initially empty (no output).
|
||||
MultiWriter::ptr_t list (new MultiWriter::writers_t ());
|
||||
|
||||
Reference in New Issue
Block a user