Fixed fieldconvert addflds module
Issue/feature addressed
FieldConvert -m addfld
wasn't working properly as ProcessCreateExpansion.cpp
isn't executed (which should be the 3rd module sequence) causing a segmentation fault from m_f->m_exp[0]
in ProcessAddFld.cpp:161
.
Proposed solution
Create a member function GetModulePrerequisites
in class Module
that defines define a list of prerequisite modules that should be loaded. In this case (of addflds
), createExp
is added as a prerequisite module of addflds.
Implementation
- Added member function
GetModulePrerequisites
to classModule
inModule.h:224
- Added
createExp
as a prerequisite module forProcessAddFld.h:83
- Added a for-loop that checks for prerequisite modules and load them in
FieldConvert.cpp:479
- Added a logic that prevents double loading modules in
FieldConvert.cpp:488
Tests
Added regression tests chanflow_m8_addfld.tst
that adds chanflow_m8_addfld.fld
to itself with xml file chanflow_m8_addfld.xml
.
Suggested reviewers
Notes
Checklist
-
Functions and classes, or changes to them, are documented. - [x] User guide/documentation is updated. -
Changelog is updated. -
Suitable tests added for new functionality. -
Contributed code is correctly formatted. (See the contributing guidelines). [x] License added to any new files.-
No extraneous files have been added (e.g. compiler output or test data files).
Edited by Chi Hin Chan