1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibRegex: Add some implied auto qualifiers

This commit is contained in:
Hendiadyoin1 2021-12-21 17:38:51 +01:00 committed by Brian Gianforcaro
parent 1fdd1915c2
commit b674de6957
4 changed files with 10 additions and 10 deletions

View file

@ -52,7 +52,7 @@ int regcomp(regex_t* reg, const char* pattern, int cflags)
// This could've been prevented if libc provided a reginit() or similar, but it does not.
reg->__data = new internal_regex_t { 0, 0, {}, 0, ReError::REG_NOERR, {} };
auto preg = impl_from(reg);
auto* preg = impl_from(reg);
bool is_extended = cflags & REG_EXTENDED;
preg->cflags = cflags;
@ -82,7 +82,7 @@ int regcomp(regex_t* reg, const char* pattern, int cflags)
int regexec(const regex_t* reg, const char* string, size_t nmatch, regmatch_t pmatch[], int eflags)
{
auto preg = impl_from(reg);
auto const* preg = impl_from(reg);
if (!preg->re.has_value() || preg->re_pat_err) {
if (preg->re_pat_err)
@ -213,7 +213,7 @@ inline static String get_error(ReError errcode)
size_t regerror(int errcode, const regex_t* reg, char* errbuf, size_t errbuf_size)
{
String error;
auto preg = impl_from(reg);
auto const* preg = impl_from(reg);
if (!preg)
error = get_error((ReError)errcode);
@ -231,7 +231,7 @@ size_t regerror(int errcode, const regex_t* reg, char* errbuf, size_t errbuf_siz
void regfree(regex_t* reg)
{
auto preg = impl_from(reg);
auto* preg = impl_from(reg);
if (preg) {
delete preg;
reg->__data = nullptr;