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:
parent
d393e70943
commit
e93c534065
2 changed files with 6 additions and 4 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue