#1575: Declare cctkGH as "const cGH*" --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
This is a one-line change in GridFuncStuff.pl, line 912, adding the respective "const" declaration.
Unfortunately, this change creates a lot of fallout. Many infrastructure thorns (driver, coordinates, I/O) change cctkGH, and would all have to cast away this const declaration. I'm not sure this is worth the effort.
Also, since this casting-away is legal in this case, compilers cannot use this const declaration to optimize code. (I did not know this before.)