Skip to content

Commit

Permalink
ADBC: fix performance issue warnings of Coverity Scan
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 30, 2024
1 parent d35c4c4 commit 3761727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/adbc/ogradbcdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ OGRLayer *OGRADBCDataset::GetLayerByName(const char *pszName)
auto oRoot = oDoc.GetRoot();
if (oRoot.GetType() == CPLJSONObject::Type::Array)
{
for (auto oSchema : oRoot.ToArray())
for (const auto &oSchema : oRoot.ToArray())
{
if (oSchema.GetType() == CPLJSONObject::Type::Object)
{
Expand All @@ -517,7 +517,7 @@ OGRLayer *OGRADBCDataset::GetLayerByName(const char *pszName)
oSchema.GetArray("db_schema_tables");
if (oTables.IsValid())
{
for (auto oTable : oTables)
for (const auto &oTable : oTables)
{
if (oTable.GetType() ==
CPLJSONObject::Type::Object)
Expand Down

0 comments on commit 3761727

Please sign in to comment.