From ee3e3f77ac0957355263a4ea6da1439cb6c624fb Mon Sep 17 00:00:00 2001 From: Dmitry Fleytman Date: Wed, 23 Apr 2014 15:56:30 +0300 Subject: UsbDk: Mark string compare operators const Signed-off-by: Dmitry Fleytman --- UsbDk/UsbDkUtil.cpp | 2 +- UsbDk/UsbDkUtil.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UsbDk/UsbDkUtil.cpp b/UsbDk/UsbDkUtil.cpp index 2cb17fe..62adf40 100644 --- a/UsbDk/UsbDkUtil.cpp +++ b/UsbDk/UsbDkUtil.cpp @@ -107,7 +107,7 @@ void CString::Destroy() } } -bool CStringBase::operator== (const UNICODE_STRING& Str) +bool CStringBase::operator== (const UNICODE_STRING& Str) const { if (m_String.Length != Str.Length) { diff --git a/UsbDk/UsbDkUtil.h b/UsbDk/UsbDkUtil.h index d5c02f2..7764537 100644 --- a/UsbDk/UsbDkUtil.h +++ b/UsbDk/UsbDkUtil.h @@ -305,12 +305,12 @@ private: class CStringBase { public: - bool operator== (const CStringBase &Other) + bool operator== (const CStringBase &Other) const { return *this == Other.m_String; } - bool operator== (const UNICODE_STRING& Str); + bool operator== (const UNICODE_STRING& Str) const; - bool operator== (PCWSTR Other) + bool operator== (PCWSTR Other) const { UNICODE_STRING str; if (NT_SUCCESS(RtlUnicodeStringInit(&str, Other))) -- cgit v1.2.3