]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/registry.qh
Reduce a bit expanded code of some often used macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / registry.qh
index d8f18a02c96e4ab98b749530dd5f1f58550609b5..520b00c06342ca095fb79560e9793cee11a3b64d 100644 (file)
@@ -162,12 +162,10 @@ void Registry_send(string id, string hash);
        STATIC_INIT(Registry_check_##id) \
        { \
                /* Note: SHA256 isn't always available, use MD4 instead */ \
-               string algo = "MD4"; \
-               string join = ":"; \
-               string s = ""; \
+               string s = "", join = ":"; \
                FOREACH(id, true, s = strcat(s, join, it.registered_id)); \
                s = substring(s, strlen(join), -1); \
-               string h = REGISTRY_HASH(id) = strzone(digest_hex(algo, s)); \
+               string h = REGISTRY_HASH(id) = strzone(digest_hex("MD4", s)); \
                LOG_DEBUGF(#id ": %s\n[%s]", h, s); \
        } \
        void Registry_check(string r, string sv) \