[PR #2345] [MERGED] Pass by value to trim functions #2491

Closed
opened 2026-03-04 02:05:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2345
Author: @gaul
Created: 10/9/2023
Status: Merged
Merged: 10/12/2023
Merged by: @ggtakec

Base: masterHead: trim/value


📝 Commits (1)

  • 1cb5a32 Pass by value to trim functions

📊 Changes

2 files changed (+8 additions, -10 deletions)

View changed files

📝 src/string_util.cpp (+5 -7)
📝 src/string_util.h (+3 -3)

📄 Description

These already force a copy so passing by value has the same performance but is simpler. But this allows the compiler to perform copy elision on temporaries and the caller to explicitly std::move in others.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2345 **Author:** [@gaul](https://github.com/gaul) **Created:** 10/9/2023 **Status:** ✅ Merged **Merged:** 10/12/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `trim/value` --- ### 📝 Commits (1) - [`1cb5a32`](https://github.com/s3fs-fuse/s3fs-fuse/commit/1cb5a326986ae06f3bc9dbe364ab58d2ed779024) Pass by value to trim functions ### 📊 Changes **2 files changed** (+8 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/string_util.cpp` (+5 -7) 📝 `src/string_util.h` (+3 -3) </details> ### 📄 Description These already force a copy so passing by value has the same performance but is simpler. But this allows the compiler to perform copy elision on temporaries and the caller to explicitly `std::move` in others. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2491
No description provided.