Skip to content

Commit

Permalink
Removed switch statement (issue #204)
Browse files Browse the repository at this point in the history
Because all cases of the switch statement did the exact same thing, the entire block has been replaced with `transp = SXW.transpTotal`
  • Loading branch information
chaukap committed Jan 21, 2019
1 parent 5af9744 commit 749cea7
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions sxw_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,7 @@ static void _transp_contribution_by_group(RealF use_by_group[]) {
{
use_by_group[g] = 0.;
t = RGroup[g]->veg_prod_type - 1;

switch (t) {
case 0://Tree
transp = SXW.transpTotal;
break;
case 1://Shrub
transp = SXW.transpTotal;
break;
case 2://Grass
transp = SXW.transpTotal;
break;
case 3://Forb
transp = SXW.transpTotal;
break;
default:
transp = SXW.transpTotal;
break;
}
transp = SXW.transpTotal;

//Loops through each month and calculates amount of transpiration for each STEPPE functional group
//according to whether that group has active living roots in each soil layer for each month
Expand Down

0 comments on commit 749cea7

Please sign in to comment.