Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use correct length modifier
  • Loading branch information
bdero committed Dec 31, 2022
commit 6654f3bb6164bb1713367ce7c1d7e44d24cbd553
5 changes: 2 additions & 3 deletions impeller/scene/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "impeller/scene/node.h"

#include <inttypes.h>
#include <atomic>
#include <memory>

Expand Down Expand Up @@ -193,9 +194,7 @@ void Node::UnpackFromFlatbuffer(
}
}

Node::Node()
: name_(SPrintF("__node%llu",
static_cast<uint64_t>(kNextNodeID.fetch_add(1)))){};
Node::Node() : name_(SPrintF("__node%" PRIu64, kNextNodeID.fetch_add(1))){};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just use operator++ for these atomics which does the same thing and perhaps is a bit clearer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, that's nice. Done.


Node::~Node() = default;

Expand Down