Fix compile error on MSVC2008 Express Edition with Debugging Tools for Windows(CDB).

Following implicit cast occurred error C2664 from cl compiler.
 (const WCHAR *) => (const ushort *)
 (const ushort *) => (PCWSTR)
So fixed by using a explicit cast which reinterpret_cast.
This commit is contained in:
axasia
2009-05-30 23:03:43 +09:00
parent 57bb98b68b
commit 8d53cb0fb4
10 changed files with 25 additions and 27 deletions

View File

@@ -102,7 +102,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa
frame.address = QString::fromLatin1("0x%1").arg(instructionOffset, 0, 16);
m_cif->debugSymbols->GetNameByOffsetWide(instructionOffset, wszBuf, MAX_PATH, 0, 0);
frame.function = QString::fromUtf16(wszBuf);
frame.function = QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf));
ULONG ulLine;
ULONG64 ul64Displacement;
@@ -111,7 +111,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa
frame.line = ulLine;
// Vitally important to use canonical file that matches editormanager,
// else the marker will not show.
frame.file = CDBBreakPoint::canonicalSourceFile(QString::fromUtf16(wszBuf));
frame.file = CDBBreakPoint::canonicalSourceFile(QString::fromUtf16(reinterpret_cast<const ushort *>(wszBuf)));
}
m_frames.push_back(frame);
}