| 54 | } |
| 55 | |
| 56 | std::string FormatScriptFlags(uint32_t flags) { |
| 57 | if (flags == 0) { |
| 58 | return ""; |
| 59 | } |
| 60 | |
| 61 | std::string ret; |
| 62 | std::map<std::string, uint32_t>::const_iterator it = mapFlagNames.begin(); |
| 63 | while (it != mapFlagNames.end()) { |
| 64 | if (flags & it->second) { |
| 65 | ret += it->first + ","; |
| 66 | } |
| 67 | it++; |
| 68 | } |
| 69 | |
| 70 | return ret.substr(0, ret.size() - 1); |
| 71 | } |