Repository navigation
Commit f23c186
committed
[BUGFIX] Compare the status instead of extracting it
IsAcknowledgedStatus is noexcept and reached get<T>() through a type check, so
the guard was what kept the promise rather than the code. clang-tidy reads it
the way it is written and reports bugprone-exception-escape, which puts the
abiv1-preview preset one warning over its limit of 133.
Comparing the json value directly holds the same answers without an extraction
to guard: 200 and 201 in either integer type are accepted, 2^32 + 200 is not,
and a float is still rejected by the type check. The two IsAppliedStatus
overloads existed to keep the unsigned case out of a signed comparison, and the
comparison does that itself, so they go with it.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent 2b5e8ce commit f23c186
1 file changed
Lines changed: 6 additions & 34 deletions
File tree
- exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/detail
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
57 | 39 | | |
58 | 40 | | |
59 | 41 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 42 | + | |
71 | 43 | | |
72 | 44 | | |
73 | 45 | | |
| |||
0 commit comments