Skip to content

Commit f751e61

Browse files
derekmaurocopybara-github
authored andcommitted
absl::string_view: Upgrade the debug assert on the single argument
char* constructor to ABSL_HARDENING_ASSERT PiperOrigin-RevId: 831936299 Change-Id: Idd2fad18fe8e8a07d8d8759026bd366b7ef479c2
1 parent 03cc841 commit f751e61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

absl/strings/string_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class ABSL_ATTRIBUTE_VIEW string_view {
227227
constexpr string_view( // NOLINT(runtime/explicit)
228228
const char* absl_nonnull str)
229229
: ptr_(str), length_(str ? StrlenInternal(str) : 0) {
230-
assert(str != nullptr);
230+
ABSL_HARDENING_ASSERT(str != nullptr);
231231
}
232232

233233
// Constructor of a `string_view` from a `const char*` and length.

0 commit comments

Comments
 (0)