Skip to content

Commit 904c6f4

Browse files
committed
format: formatting files
1 parent b2fe54c commit 904c6f4

File tree

10 files changed

+31
-44
lines changed

10 files changed

+31
-44
lines changed

src-test/client/jsonUITest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ LL_AUTO_TYPE_INSTANCE_HOOK(
4848
hovertext.append("§8");
4949
hovertext.append(stack.getTypeName());
5050
hovertext.append("§r");
51-
uint64_t max = stack.getItem()->getMaxDamage();
51+
uint64 max = stack.getItem()->getMaxDamage();
5252
if (max != 0) {
53-
uint64_t current = max - stack.getDamageValue();
53+
uint64 current = max - stack.getDamageValue();
5454
hovertext.append(fmt::format("\n§7耐久: {} / {}§r", current, max));
5555
}
5656

src-test/server/FormTest.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,7 @@ void registerFormTestCommand() {
5050
return;
5151
}
5252
for (auto [name, result] : *data) {
53-
static auto logDebugResult = [&](ll::form::CustomFormElementResult const& var) {
54-
if (std::holds_alternative<uint64_t>(var)) {
55-
logptr->info("CustomForm callback {} = {}", name, std::get<uint64_t>(var));
56-
} else if (std::holds_alternative<double>(var)) {
57-
logptr->info("CustomForm callback {} = {}", name, std::get<double>(var));
58-
} else if (std::holds_alternative<std::string>(var)) {
59-
logptr->info("CustomForm callback {} = {}", name, std::get<std::string>(var));
60-
}
61-
};
62-
logDebugResult(result);
53+
visit([&](auto& v) { logptr->info("CustomForm callback {} = {}", name, v); }, result);
6354
}
6455
}
6556
);

src/mc/deps/core/threading/SPSCQueue.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class SPSCQueue {
1010
SPSCQueue(SPSCQueue const&);
1111
SPSCQueue();
1212

13-
std::atomic<void*> mFrontBlock; // this+0x0
14-
char mCachelineFiller[56]; // this+0x8
15-
std::atomic<void*> mTailBlock; // this+0x40
16-
uint64_t mLargestBlockSize; // this+0x48
13+
std::atomic<void*> mFrontBlock;
14+
char mCachelineFiller[56];
15+
std::atomic<void*> mTailBlock;
16+
uint64 mLargestBlockSize;
1717
};

src/mc/entity/components/TagsComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ template <typename T>
77
class TagsComponent : public TagsComponentBase {
88
public:
99
T mTagSetID;
10-
};
10+
};

src/mc/server/commands/CommandOrigin.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,9 @@ class CommandOrigin {
150150
MCAPI ::std::unique_ptr<::CommandArea>
151151
getAreaAt(::BlockPos const& min, ::BlockPos const& max, int commandVersion, bool allowUnloadedChunks) const;
152152

153-
MCAPI ::std::unique_ptr<::CommandArea> getAreaAtWithBuffer(
154-
::BlockPos const& min,
155-
::BlockPos const& max,
156-
int commandVersion,
157-
bool allowUnloadedChunks
158-
) const;
153+
MCAPI ::std::unique_ptr<::CommandArea>
154+
getAreaAtWithBuffer(::BlockPos const& min, ::BlockPos const& max, int commandVersion, bool allowUnloadedChunks)
155+
const;
159156
// NOLINTEND
160157

161158
public:

src/mc/server/commands/CommandSelectorBase.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ class CommandSelectorBase {
4444
::CommandPosition mPosition{};
4545
::Vec3 mBoxDeltas{};
4646
float mRadiusMinSqr{0.0f};
47-
float mRadiusMaxSqr{std::numeric_limits<float>::max()};
48-
uint64 mCount{std::numeric_limits<uint>::max()};
49-
bool mIncludeDeadPlayers{};
50-
bool mIsPositionBound{};
51-
bool mDistanceFiltered{};
52-
bool mPositionFiltered{};
53-
bool mCountFiltered{};
54-
bool mHaveDeltas{};
55-
bool mForcePlayer{};
56-
bool mExcludeAgents{};
57-
bool mIsExplicitIdSelector{};
58-
bool mForceDimensionFiltering{};
47+
float mRadiusMaxSqr{std::numeric_limits<float>::max()};
48+
uint64 mCount{std::numeric_limits<uint>::max()};
49+
bool mIncludeDeadPlayers{};
50+
bool mIsPositionBound{};
51+
bool mDistanceFiltered{};
52+
bool mPositionFiltered{};
53+
bool mCountFiltered{};
54+
bool mHaveDeltas{};
55+
bool mForcePlayer{};
56+
bool mExcludeAgents{};
57+
bool mIsExplicitIdSelector{};
58+
bool mForceDimensionFiltering{};
5959
// NOLINTEND
6060

6161
CommandSelectorBase() = default;

src/mc/util/IDType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
template <typename T>
66
struct IDType {
7-
std::optional<uint64_t> mID;
7+
std::optional<uint64> mID;
88
};

src/mc/util/TagRegistry.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
template <typename TagID, typename TagSetID>
99
class TagRegistry {
1010
public:
11-
std::unordered_map<HashedString, unsigned long> mTagIndexMap;
12-
std::vector<std::string> mTags;
13-
std::vector<IndexSet> mSets;
14-
TagSetID mEmptyTagSet;
11+
std::unordered_map<HashedString, uint64> mTagIndexMap;
12+
std::vector<std::string> mTags;
13+
std::vector<IndexSet> mSets;
14+
TagSetID mEmptyTagSet;
1515

1616
MCAPI TagID tryGetTagID(const std::string&) const;
1717
MCAPI std::vector<std::string> const getTagsInSet(TagSetID);
@@ -20,4 +20,4 @@ class TagRegistry {
2020
MCAPI TagID acquireTag(const std::string&);
2121
MCAPI TagSetID getTagSetID(const IndexSet&);
2222
MCAPI TagSetID getTagSetID(const std::vector<TagID>&);
23-
};
23+
};

src/mc/world/events/ItemGameplayEvent.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ template <typename Return>
99
struct ItemGameplayEvent;
1010

1111
template <>
12-
struct ItemGameplayEvent<void>
13-
: ConstEventVariant<ShapedRecipeTriggeredEvent, CraftUpdateResultItemClientEvent> {};
12+
struct ItemGameplayEvent<void> : ConstEventVariant<ShapedRecipeTriggeredEvent, CraftUpdateResultItemClientEvent> {};

src/mc/world/scores/PlayerScoreboardId.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ template <>
2424
struct hash<PlayerScoreboardId> {
2525
int64 operator()(PlayerScoreboardId const& d) const noexcept { return d.mActorUniqueId; }
2626
};
27-
} // namespace std
27+
} // namespace std

0 commit comments

Comments
 (0)