add check_size_vec_t
This commit is contained in:
@@ -120,6 +120,12 @@ T& check_size_t(void* data, size_t size) {
|
|||||||
return check_size_generic<T, void*>(data, size, sizeof(T), sizeof(T));
|
return check_size_generic<T, void*>(data, size, sizeof(T), sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T* check_size_vec_t(std::string& data, size_t count) {
|
||||||
|
size_t expected_size = count * sizeof(T);
|
||||||
|
return &check_size_generic<T, void*>(data.data(), data.size(), expected_size, expected_size);
|
||||||
|
}
|
||||||
|
|
||||||
void check_size_v(size_t size, size_t min_size, size_t max_size = 0);
|
void check_size_v(size_t size, size_t min_size, size_t max_size = 0);
|
||||||
|
|
||||||
std::string prepend_command_header(
|
std::string prepend_command_header(
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "Episode3/DataIndexes.hh"
|
#include "Episode3/DataIndexes.hh"
|
||||||
#include "ItemNameIndex.hh"
|
#include "ItemNameIndex.hh"
|
||||||
#include "PSOEncryption.hh"
|
#include "PSOEncryption.hh"
|
||||||
|
#include "PSOProtocol.hh"
|
||||||
#include "PlayerSubordinates.hh"
|
#include "PlayerSubordinates.hh"
|
||||||
#include "Text.hh"
|
#include "Text.hh"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user