Skip to content

Commit 0e38a13

Browse files
committed
ogrsqliteregexp.cpp: for (old) PCRE, use C++ casts
1 parent 2d169a7 commit 0e38a13

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ogr/ogrsf_frmts/sqlite/ogrsqliteregexp.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ static void OGRSQLiteREGEXPFunction(sqlite3_context *ctx, CPL_UNUSED int argc,
209209
{
210210
CPLAssert(argc == 2);
211211

212-
const char *re = (const char *)sqlite3_value_text(argv[0]);
212+
const char *re =
213+
reinterpret_cast<const char *>(sqlite3_value_text(argv[0]));
213214
if (!re)
214215
{
215216
sqlite3_result_error(ctx, "no regexp", -1);
@@ -222,15 +223,16 @@ static void OGRSQLiteREGEXPFunction(sqlite3_context *ctx, CPL_UNUSED int argc,
222223
return;
223224
}
224225

225-
const char *str = (const char *)sqlite3_value_text(argv[1]);
226+
const char *str =
227+
reinterpret_cast<const char *>(sqlite3_value_text(argv[1]));
226228
if (!str)
227229
{
228230
sqlite3_result_error(ctx, "no string", -1);
229231
return;
230232
}
231233

232234
/* simple LRU cache */
233-
cache_entry *cache = (cache_entry *)sqlite3_user_data(ctx);
235+
cache_entry *cache = static_cast<cache_entry *>(sqlite3_user_data(ctx));
234236
CPLAssert(cache);
235237

236238
bool found = false;

0 commit comments

Comments
 (0)