From 8aebc731631e2b12607608f0a6b7c4ffe76f8903 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sun, 21 Apr 2013 22:41:35 +0900 Subject: [PATCH] Cppcheck: Function parameter 'str1' should be passed by reference. --- Src/stringdiffs.cpp | 2 +- Src/stringdiffs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/stringdiffs.cpp b/Src/stringdiffs.cpp index 7b6e9a9f9..bfc3105a6 100644 --- a/Src/stringdiffs.cpp +++ b/Src/stringdiffs.cpp @@ -64,7 +64,7 @@ void sd_SetBreakChars(const TCHAR *breakChars) } void -sd_ComputeWordDiffs(const String str1, const String str2, +sd_ComputeWordDiffs(const String& str1, const String& str2, bool case_sensitive, int whitespace, int breakType, bool byte_level, std::vector * pDiffs) { diff --git a/Src/stringdiffs.h b/Src/stringdiffs.h index 97450e4cc..753691fd2 100644 --- a/Src/stringdiffs.h +++ b/Src/stringdiffs.h @@ -44,7 +44,7 @@ void sd_Close(); void sd_SetBreakChars(const TCHAR *breakChars); -void sd_ComputeWordDiffs(const String str1, const String str2, +void sd_ComputeWordDiffs(const String& str1, const String& str2, bool case_sensitive, int whitespace, int breakType, bool byte_level, std::vector * pDiffs); void sd_ComputeWordDiffs(int nStrings, const String str[3], -- 2.11.0