1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Apply review.

This commit is contained in:
SFENCE 2025-06-09 20:14:30 +02:00
parent d393e70943
commit e93c534065
2 changed files with 6 additions and 4 deletions

View file

@ -16,7 +16,7 @@ std::string MyGUID::base64() const
return base64_encode(std::string_view(&bytes[0], bytes.size()));
}
void MyGUID::serialize(std::ostringstream &os) const
void MyGUID::serialize(std::ostream &os) const
{
os.write(&bytes[0], bytes.size());
}

View file

@ -17,15 +17,17 @@ class ServerEnvironment;
* It is global because it stays valid forever.
* It is unique because there are no collisions.
*/
struct MyGUID {
struct MyGUID
{
std::array<char, 16> bytes;
std::string base64() const;
void serialize(std::ostringstream &os) const;
void serialize(std::ostream &os) const;
void deSerialize(std::istream &is);
};
class GUIDGenerator {
class GUIDGenerator
{
DISABLE_CLASS_COPY(GUIDGenerator)
public: