Problem.cpp 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Problem.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "Problem.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace spells
  14. {
  15. namespace detail
  16. {
  17. void ProblemImpl::add(MetaString && description, Severity severity)
  18. {
  19. data.emplace_back(description, severity);
  20. }
  21. void ProblemImpl::getAll(std::vector<std::string> & target) const
  22. {
  23. for(const auto & p : data)
  24. target.push_back(p.first.toString());
  25. }
  26. //void ProblemImpl::getMostSevere(std::vector<std::string> & target) const
  27. //{
  28. // //TODO:
  29. //}
  30. //
  31. //std::string ProblemImpl::getMostSevere() const
  32. //{
  33. // std::vector<std::string> temp;
  34. // getMostSevere(temp);
  35. // return temp.empty() ? "" : temp.front();
  36. //}
  37. }
  38. }
  39. VCMI_LIB_NAMESPACE_END