Add const modifier to some arguments of GMT API functions
|Target version:||Candidate for next minor release|
To prevent compiler warnings such as "deprecated conversion from string constant to «char*»" or "invalid conversion from 'const void*' to 'void*'" I offer to use const modifier in some arguments of GMT API functions.
The first parameter of the function GMT_Create_Session is an obvious case. The third argument of the GMT_Create_Options is an another case. I attach the simple patch for the first case (GMT_Create_Session), but the second case requires some internal modifications of GMT_Create_Options. I think that such a modification is needed, in order to be able to write something like GMT_Create_Options(api,0,"-O -K") or GMT_Create_Options(api,0,std_string.c_str()) without side effects.
#2 Updated by Paul over 1 year ago
- Status changed from In Progress to Resolved
- Target version set to Candidate for next minor release
- % Done changed from 0 to 100
I've gone through all the API functions and unless text is returned via a char * pointer I have made changes so they are all const char *. In r14942 [GMT 5.2].