Commit 1b0a220
authored
### Rationale for this change
Fixes compilation error on macOS: `-Wpessimizing-move` warning. `std::move()` on a ternary expression prevents copy elision. `shared_ptr` assignment already handles moves automatically, so `std::move` is unnecessary and hurts optimization.
### What changes are included in this PR?
Removed `std::move()` from ternary expression in `ColumnMetadata` constructor (`cpp/src/arrow/flight/sql/column_metadata.cc:62`). Behavior unchanged - still ensures `metadata_map_` is never null.
### Are these changes tested?
Yes. Existing tests cover `ColumnMetadata` functionality. No behavioral changes, so tests continue to pass.
### Are there any user-facing changes?
No. Compilation fix only. Behavior identical, may have slight performance improvement from better compiler optimizations.
* GitHub Issue: #47721
Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
1 parent 0c694e7 commit 1b0a220
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments