Pass string views by value
string_view should always be passed by value; This commit is a sed
replace of the code to make all string_views pass by value, per general
coding guidelines[1].
[1] https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I55b342a29a0fbfce0a4ed9ea63db6014d03b134c
diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
index ca8c8d3..5802078 100644
--- a/include/pam_authenticate.hpp
+++ b/include/pam_authenticate.hpp
@@ -83,8 +83,8 @@
* @param username The provided username aka account name.
* @param password The provided password.
* @returns PAM error code or PAM_SUCCESS for success. */
-inline int pamAuthenticateUser(const std::string_view username,
- const std::string_view password)
+inline int pamAuthenticateUser(std::string_view username,
+ std::string_view password)
{
std::string userStr(username);
std::string passStr(password);