metamod-hl1
metamod-hl1 copied to clipboard
Unwanted 'const' in meta_api.h?
Is it just me or is that 'const' should be removed? It seems to not have it on the Metamod-P src version. When I removed those 'const' from meta_api.h starting in line 134, it appears to allow my compiler for GCC 4.8 work.
C_DLLEXPORT int Meta_Query(const char *interfaceVersion, plugin_info_t **plinfo, mutil_funcs_t *pMetaUtilFuncs); typedef int (*META_QUERY_FN) (const char *interfaceVersion, plugin_info_t **plinfo, mutil_funcs_t *pMetaUtilFuncs);
Is this for a plugin? The docs say Meta_Query's signature should be non-const, but in the code it's internally consistent and the string really is const.
Yes that header file is for a Metamod plugin.
Sent from BlueMail
On 3 Mar 2018, 23:41, at 23:41, David Anderson [email protected] wrote:
Is this for a plugin? The docs say Meta_Query's signature should be non-const, but in the code it's internally consistent and the string really is const.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/alliedmodders/metamod-hl1/issues/6#issuecomment-370188836
We const-qualified these to avoid compiler warnings. You could try to get the same changes upstreamed to metamod-p. Since they are supposed to be ABI compatible it shouldn't matter, you can build your plugin against either.