*
This commit is contained in:
@@ -868,9 +868,11 @@ PreparedNodeState::PreparedNodeState(const std::string_view modid, const sol::ta
|
||||
|
||||
}
|
||||
|
||||
PreparedNodeState::PreparedNodeState(const std::u8string& data) {
|
||||
PreparedNodeState::PreparedNodeState(const std::u8string_view data) {
|
||||
Net::LinearReader lr(data);
|
||||
|
||||
lr.read<uint16_t>();
|
||||
|
||||
uint16_t size;
|
||||
lr >> size;
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ struct PreparedNodeState {
|
||||
|
||||
PreparedNodeState(const std::string_view modid, const js::object& profile);
|
||||
PreparedNodeState(const std::string_view modid, const sol::table& profile);
|
||||
PreparedNodeState(const std::u8string& data);
|
||||
PreparedNodeState(const std::u8string_view data);
|
||||
|
||||
PreparedNodeState() = default;
|
||||
PreparedNodeState(const PreparedNodeState&) = default;
|
||||
|
||||
@@ -180,6 +180,10 @@ protected:
|
||||
: Pos(pos), Input(input)
|
||||
{}
|
||||
|
||||
LinearReader(const std::u8string_view input, size_t pos = 0)
|
||||
: Pos(pos), Input(input)
|
||||
{}
|
||||
|
||||
LinearReader(const LinearReader&) = delete;
|
||||
LinearReader(LinearReader&&) = delete;
|
||||
LinearReader& operator=(const LinearReader&) = delete;
|
||||
@@ -226,7 +230,7 @@ protected:
|
||||
|
||||
private:
|
||||
size_t Pos = 0;
|
||||
const std::u8string& Input;
|
||||
const std::u8string_view Input;
|
||||
};
|
||||
|
||||
class SmartPacket : public Packet {
|
||||
|
||||
Reference in New Issue
Block a user