* Calculate the gross length of the string that it * will occupy in the savegame. This includes the real length, returned * by SlCalcNetStringLen and the length that the index will occupy. * @param ptr Pointer to the \c std::string. * @return The gross length of the string. */
| 915 | * @return The gross length of the string. |
| 916 | */ |
| 917 | static inline size_t SlCalcStdStringLen(const void *ptr) |
| 918 | { |
| 919 | const std::string *str = reinterpret_cast<const std::string *>(ptr); |
| 920 | |
| 921 | size_t len = str->length(); |
| 922 | return len + SlGetArrayLength(len); // also include the length of the index |
| 923 | } |
| 924 | |
| 925 | |
| 926 | /** |
no test coverage detected