Changeset 18522


Ignore:
Timestamp:
09/16/14 08:21:32 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: this one seems to require dynamic_cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp

    r18521 r18522  
    1010IssmDouble OutputDefinitionsResponsex(FemModel* femmodel,const char* output_string){
    1111
    12         Definition *definition         = NULL;
    13         DataSet    *output_definitions = NULL;
    14         IssmDouble  return_value;
    15 
    1612        /*Ok, go find the output definitions dataset in the parameters, where our responses are hiding: */
    17         output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value;
     13        DataSet* output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value;
    1814
    1915        /*Now, go through the output definitions, and retrieve the object which corresponds to our requested response, output_string: */
    2016        for(int i=0;i<output_definitions->Size();i++){
    2117               
    22                 definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i));
     18                //Definition* definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i));
     19                Definition* definition=dynamic_cast<Definition*>(output_definitions->GetObjectByOffset(i));
    2320
    2421                char* name = definition->Name();
    25                 if (strcmp(name,output_string)==0){
     22                if(strcmp(name,output_string)==0){
    2623
    2724                        /*This is the object that we have been chasing for. compute the response and return: */
    28                         return_value=definition->Response(femmodel);
     25                        IssmDouble return_value=definition->Response(femmodel);
    2926               
    3027                        /*cleanup: */
Note: See TracChangeset for help on using the changeset viewer.