--- deliantra/server/include/shstr.h 2006/09/12 18:15:34 1.10 +++ deliantra/server/include/shstr.h 2007/02/05 02:07:40 1.12 @@ -101,6 +101,18 @@ return sh.length (); } +inline int strcmp (const shstr &a, const shstr &b) +{ + // TODO: use this to find all the occurences of people using strcmp + // all uses should be bogus, as we should be never interested in + // comparing shstr's alphabetically +#if 0 + extern void do_not_use_strcmp_to_compare_shstr_values (); + do_not_use_strcmp_to_compare_shstr_values (); +#endif + return a != b; +} + // only good for mass comparisons to shstr objects struct shstr_cmp { @@ -111,6 +123,12 @@ { } + shstr_cmp (const shstr_cmp &sh) + : s (sh.s) + { + } + + shstr_cmp &operator =(const shstr_cmp sh) { s = sh.s; return *this; } operator const char *() const { return s; } };