Commit 6310321
committed
Merge #6513: refactor: make SEMToString / SEMFromString constexpr by using string_view
80f4537 refactor: make SEMToString / SEMFromString constexpr by using string_view (Pasta)
Pull request description:
## Issue being fixed or feature implemented
Apple clang version 16.0.0 (clang-1600.0.26.6) reports warnings such as:
```
./util/sock.h:32:20: warning: unused function 'SEMToString' [-Wunused-function]
32 | static std::string SEMToString(const SocketEventsMode val)
| ^~~~~~~~~~~
./util/sock.h:55:25: warning: unused function 'SEMFromString' [-Wunused-function]
55 | static SocketEventsMode SEMFromString(const std::string str)
| ^~~~~~~~~~~~~
```
## What was done?
Converted these functions from static to constexpr, this results in these warnings being resolved
## How Has This Been Tested?
Compiled
## Breaking Changes
None
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 80f4537
Tree-SHA512: 1b44ec2bc02da5c861d7c863c05f76071006d4f6e4188d81e8e69277b6894a0073c64e6e98d467380b7df541d75df9154826399ca0b97bccd7c9fc781adacdd12 files changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | | - | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | | - | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
| 60 | + | |
63 | 61 | | |
64 | 62 | | |
65 | | - | |
| 63 | + | |
66 | 64 | | |
67 | | - | |
| 65 | + | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
0 commit comments