X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsgml.cpp;h=2facb3ed539e280d459fed50a9f9fba1ba7f3b48;hb=c75d9bf7c4e1ec31b31be55ce3f88ba605cff625;hp=75802c2bd44d2113da87253c0c31ffb0fc267df0;hpb=b6aed54c45cf4a479cfd11e3e6851194f5a05947;p=lyx.git diff --git a/src/sgml.cpp b/src/sgml.cpp index 75802c2bd4..2facb3ed53 100644 --- a/src/sgml.cpp +++ b/src/sgml.cpp @@ -27,6 +27,7 @@ #include "support/lstrings.h" #include "support/textutils.h" +#include #include #include @@ -105,10 +106,8 @@ docstring sgml::escapeString(docstring const & raw) docstring const sgml::uniqueID(docstring const & label) { - // FIXME THREAD - // It seems unlikely there could be a problem here, - // but we could have concurrent access, in principle. - static unsigned int seed = 1000; + // thread-safe + static atomic_uint seed(1000); return label + convert(++seed); }