Commit 9223ccb
authored
Avoid std::string -> (char *) roundtrip in createStringError() (NFC) (#93242)
The current API first creates a temporary std::string, then passes it as
a C string, only to then convert it into a std::string for storage, thus
unnecessarily computing the length of the string and copying it.1 parent dc78329 commit 9223ccb
2 files changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | | - | |
| 1239 | + | |
| 1240 | + | |
1240 | 1241 | | |
1241 | | - | |
1242 | | - | |
| 1242 | + | |
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
| 1261 | + | |
| 1262 | + | |
1264 | 1263 | | |
1265 | 1264 | | |
1266 | | - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1267 | 1270 | | |
1268 | 1271 | | |
1269 | | - | |
| 1272 | + | |
1270 | 1273 | | |
1271 | 1274 | | |
1272 | 1275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
0 commit comments