| 1155 | |
| 1156 | // size calculation - simple types |
| 1157 | // Calculate size of serialized and compressed value |
| 1158 | template <class Type> |
| 1159 | int CalculateValueSize(const Type& value, NetworkCompressionType compression) |
| 1160 | { |
| 1161 | switch (compression) |
| 1162 | { |
| 1163 | case NCTNone: |
| 1164 | case NCTDefault: |
| 1165 | return sizeof(value); |
| 1166 | default: |
| 1167 | LOG_ERROR(Network, "Unsupported compression method {}", (int)compression); |
| 1168 | return 0; |
| 1169 | } |
| 1170 | } |
| 1171 |
no test coverage detected