Skip to content

Commit

Permalink
[?] Use std::tolower() with std::transform() correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Nov 9, 2024
1 parent 9c16454 commit 2efef77
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions server/icat/src/icatHighLevelRoutines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

// =-=-=-=-=-=-=-
// stl includes
#include <cctype> // For std::tolower
#include <string>
#include <iostream>
#include <sstream>
Expand All @@ -50,11 +51,7 @@ int chlDebug(
// =-=-=-=-=-=-=-
// run tolower on mode
std::string mode( _mode );
std::transform(
mode.begin(),
mode.end(),
mode.begin(),
::tolower );
std::transform( mode.begin(), mode.end(), mode.begin(), [](unsigned char _ch) { return std::tolower(_ch); });

// =-=-=-=-=-=-=-
// if mode contains 'sql' then turn SQL logging on
Expand Down

0 comments on commit 2efef77

Please sign in to comment.