You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
835 B

  1. --- a/src/tag/GenParseName.cxx
  2. +++ b/src/tag/GenParseName.cxx
  3. @@ -21,7 +21,13 @@
  4. #include <cstdlib>
  5. #include <map>
  6. +#if __has_include("<string_view>")
  7. #include <string_view>
  8. +using std::string_view;
  9. +#else
  10. +#include <boost/utility/string_view.hpp>
  11. +using boost::string_view;
  12. +#endif
  13. #include <stdio.h>
  14. @@ -41,7 +47,7 @@ main(int argc, char **argv)
  15. FILE *out = fopen(argv[1], "w");
  16. - std::map<std::string_view, TagType> names;
  17. + std::map<string_view, TagType> names;
  18. for (unsigned i = 0; i < unsigned(TAG_NUM_OF_ITEM_TYPES); ++i)
  19. names[tag_item_names[i]] = TagType(i);
  20. @@ -61,7 +67,7 @@ main(int argc, char **argv)
  21. char first = 0;
  22. for (const auto &i : names) {
  23. - const std::string_view name = i.first;
  24. + const string_view name = i.first;
  25. const TagType tag = i.second;
  26. if (name.front() != first) {