Skip to content

Commit

Permalink
fix: changed utilities back to how it was before
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Jan 9, 2024
1 parent 1e65441 commit 245bfed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/rconpp/rcon.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#ifdef _WIN32
#pragma warning( disable : 4251 ); // 4251 warns when we export classes or structures with stl member variables
#pragma warning( disable : 4251 ) // 4251 warns when we export classes or structures with stl member variables
#endif

#include "export.h"
Expand Down
2 changes: 1 addition & 1 deletion src/rconpp/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rconpp::packet rconpp::form_packet(const std::string_view data, int32_t id, int3

std::vector<char> temp_data(data_size + 4); /* Create a vector that exactly the size of the packet length. */

std::memcpy(temp_data.data(), &data_size, sizeof(data_size)); /* Copy size into it */
std::memcpy(temp_data.data() + 0, &data_size, sizeof(data_size)); /* Copy size into it */
std::memcpy(temp_data.data() + sizeof(data_size), &id, sizeof(id)); /* Copy id into it */
std::memcpy(temp_data.data() + sizeof(data_size) + sizeof(id), &type, sizeof(type)); /* Copy type into it */
std::memcpy(temp_data.data() + sizeof(data_size) + sizeof(id) + sizeof(type), data.data(), data.size()); /* Copy data into it */
Expand Down
2 changes: 1 addition & 1 deletion unittest/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int main() {
rconpp::rcon_client client(std::getenv("RCON_TESTING_IP"), std::stoi(std::getenv("RCON_TESTING_PORT")),
std::getenv("RCON_TESTING_PASSWORD"));

client.on_log = [](const std::string_view& log) {
client.on_log = [](const std::string_view log) {
std::cout << log << "\n";
};

Expand Down

0 comments on commit 245bfed

Please sign in to comment.