diff --git a/RpcDecompiler/InternalRpcDecompTypeDefs.cpp b/RpcDecompiler/InternalRpcDecompTypeDefs.cpp index a47df61..bbcb8e0 100644 --- a/RpcDecompiler/InternalRpcDecompTypeDefs.cpp +++ b/RpcDecompiler/InternalRpcDecompTypeDefs.cpp @@ -92,9 +92,9 @@ bool TypeToDefine::operator<( const TypeToDefine& right) { return (this->m_rva < right.m_rva); } -bool TypeToDefine::operator== ( const TypeToDefine& right) +bool operator== ( const TypeToDefine& self, const TypeToDefine& right) { - return (this->m_rva == right.m_rva); + return (self.m_rva == right.m_rva); } @@ -215,8 +215,4 @@ void ParamDesc::fillWithParamAttr(_In_ PARAM_ATTRIBUTES paramAttr) // TODO how to handle simple ref ? if(paramAttr.IsSimpleRef) m_uPtrLevel++; //.... -} - - - - +} \ No newline at end of file diff --git a/RpcDecompiler/InternalsRpcUtils.cpp b/RpcDecompiler/InternalsRpcUtils.cpp index e501c0a..fa06431 100644 --- a/RpcDecompiler/InternalsRpcUtils.cpp +++ b/RpcDecompiler/InternalsRpcUtils.cpp @@ -1,7 +1,7 @@ #include "internalRpcUtils.h" #include #include - +#include //-------------------------------------------------------------------------- BOOL __fastcall isStandardCharacter(_In_ const WCHAR wc) @@ -32,14 +32,10 @@ BOOL __fastcall isStandardCharacter(_In_ const WCHAR wc) std::string narrow( _In_ const std::wstring& ws) { - //std::vector buffer(ws.size()); - ////std::locale loc("english"); - //std::locale loc; - //std::use_facet< std::ctype > (loc).narrow(ws.data(), ws.data() + ws.size(), '?', &buffer[0]); + using convert_typeX = std::codecvt_utf8; + std::wstring_convert converterX; - //return std::string(&buffer[0], buffer.size()); - - return std::string(ws.begin(), ws.end()); + return converterX.to_bytes(ws); } diff --git a/RpcDecompiler/internalRpcDecompTypeDefs.h b/RpcDecompiler/internalRpcDecompTypeDefs.h index 74e3bfe..4557092 100644 --- a/RpcDecompiler/internalRpcDecompTypeDefs.h +++ b/RpcDecompiler/internalRpcDecompTypeDefs.h @@ -1985,7 +1985,7 @@ public: // operator bool operator<( const TypeToDefine& right); - bool operator== ( const TypeToDefine& right); + friend bool operator==( const TypeToDefine& self, const TypeToDefine& right); }; diff --git a/RpcView/EndpointsWidget.cpp b/RpcView/EndpointsWidget.cpp index 929e96e..7abadf4 100644 --- a/RpcView/EndpointsWidget.cpp +++ b/RpcView/EndpointsWidget.cpp @@ -65,7 +65,7 @@ ULONG EndpointsWidget_C::GetTotalEndpoints() //------------------------------------------------------------------------------ void EndpointsWidget_C::SnapEndpoint() { - PrivateItemList = pModel->findItems(".*", Qt::MatchRegExp, Column_Name); + PrivateItemList = pModel->findItems(".*", Qt::MatchRegularExpression, Column_Name); } diff --git a/RpcView/InterfacesWidget.cpp b/RpcView/InterfacesWidget.cpp index abe238a..f6c2ea7 100644 --- a/RpcView/InterfacesWidget.cpp +++ b/RpcView/InterfacesWidget.cpp @@ -109,7 +109,7 @@ void InterfacesWidget_C::ApplyProcessFilter(quint32 Pid) //------------------------------------------------------------------------------ void InterfacesWidget_C::SnapInterfaces() { - PrivateItemList = pModel->findItems(".*", Qt::MatchRegExp, Column_Uuid); + PrivateItemList = pModel->findItems(".*", Qt::MatchRegularExpression, Column_Uuid); } diff --git a/RpcView/ProcessWidget.cpp b/RpcView/ProcessWidget.cpp index 3753a78..001fbff 100644 --- a/RpcView/ProcessWidget.cpp +++ b/RpcView/ProcessWidget.cpp @@ -77,8 +77,8 @@ void ProcessWidget_C::SelectProcess(quint32 Pid) //------------------------------------------------------------------------------ void ProcessWidget_C::SnapProcesses() { - PrivateTreeItemList = pProcessTree->findItems(".*", Qt::MatchRegExp|Qt::MatchRecursive, Column_Pid); - PrivateViewItemList = pModel->findItems(".*", Qt::MatchRegExp, Column_Pid); + PrivateTreeItemList = pProcessTree->findItems(".*", Qt::MatchRegularExpression |Qt::MatchRecursive, Column_Pid); + PrivateViewItemList = pModel->findItems(".*", Qt::MatchRegularExpression, Column_Pid); }