mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[PR #377] refactor: Add empty() method to TagSet and use it for emptiness checks #400
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#400
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/3FS/pull/377
Author: @yurekami
Created: 1/4/2026
Status: 🔄 Open
Base:
main← Head:refactor/tagset-empty-method📝 Commits (1)
d44d1a9refactor: Add empty() method to TagSet and use it for emptiness checks📊 Changes
2 files changed (+4 additions, -3 deletions)
View changed files
📝
src/common/monitor/Sample.h(+1 -0)📝
src/common/monitor/ScopedMetricsWriter.h(+3 -3)📄 Description
Summary
empty()method toTagSetclass for consistent container interface.size() > 0checks with!.empty()inScopedMetricsWriterMotivation
This follows the clang-tidy
readability-container-size-emptyguideline which recommends usingempty()instead of comparingsize()to zero.Benefits:
!.empty()is more idiomatic and clearer than.size() > 0TagSetwith standard container interfacesempty()can be more efficient thansize() == 0for some container typesChanges
src/common/monitor/Sample.h: Addedbool empty() constmethod toTagSetclasssrc/common/monitor/ScopedMetricsWriter.h: Replaced 3 instances of.size() > 0with!.empty()Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.