Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Pospelove committed Dec 15, 2024
1 parent 2c3d834 commit 6b64330
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 15 deletions.
31 changes: 24 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:22

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
clang-format-15 \
# Clean cache
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* \
&& mv /usr/bin/clang-format-15 /usr/bin/clang-format
RUN \
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg \
&& echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' > /etc/apt/sources.list.d/kitware.list \
&& apt-get update \
&& apt-get install -y \
nodejs \
yarn \
libicu-dev \
git \
cmake \
curl \
unzip \
tar \
make \
zip \
pkg-config \
cmake \
clang-15 \
clang-format-15 \
ninja-build \
&& rm -rf /var/lib/apt/lists/* \
&& mv /usr/bin/clang-format-15 /usr/bin/clang-format
1 change: 1 addition & 0 deletions serialization/include/archives/BitStreamInputArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <slikenet/BitStream.h>
#include <stdexcept>
#include <string>
#include <variant>
#include <vector>

#include "../impl/BitStreamUtil.h"
Expand Down
6 changes: 4 additions & 2 deletions serialization/include/archives/JsonOutputArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "concepts/Concepts.h"
#include <algorithm>
#include <nlohmann/json.hpp>
#include <variant>
#include <vector>

class JsonOutputArchive
Expand Down Expand Up @@ -54,11 +55,12 @@ class JsonOutputArchive
}

template <typename... Types>
JsonOutputArchive& Serialize(const char* key, std::variant<Types...>& value)
JsonOutputArchive& Serialize(const char* key,
const std::variant<Types...>& value)
{
auto serializeVisitor = [&](auto& v) {
JsonOutputArchive childArchive;
childArchive.Serialize("element", element);
childArchive.Serialize("element", v);
return childArchive.j["element"];
};

Expand Down
2 changes: 1 addition & 1 deletion serialization/include/archives/SimdJsonInputArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class SimdJsonInputArchive
}

if (deserializationSuccessful) {
value = std::move(deserializedValue);
output = std::move(deserializedValue);
}

return deserializationSuccessful;
Expand Down
2 changes: 1 addition & 1 deletion skymp5-server/cpp/messages/PutItemMessage.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Inventory.h"
#include "../server_guest_lib/Inventory.h"
#include "MessageBase.h"
#include "MsgType.h"
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion skymp5-server/cpp/messages/SetInventoryMessage.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Inventory.h"
#include "../server_guest_lib/Inventory.h"
#include "MessageBase.h"
#include "MsgType.h"
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion skymp5-server/cpp/messages/TakeItemMessage.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Inventory.h"
#include "../server_guest_lib/Inventory.h"
#include "MessageBase.h"
#include "MsgType.h"
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion skymp5-server/cpp/messages/UpdateGameModeDataMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct UpdateGameModeDataMessage
{
static constexpr auto kMsgType =
std::integral_constant<char,
static_cast<char>(MsgType::UpdateGameModeData)>{};
static_cast<char>(MsgType::UpdateGamemodeData)>{};

template <class Archive>
void Serialize(Archive& archive)
Expand Down
1 change: 0 additions & 1 deletion skymp5-server/cpp/server_guest_lib/AnimationData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
#include "JsonUtils.h"
#include <simdjson.h>

struct AnimationData
Expand Down

0 comments on commit 6b64330

Please sign in to comment.