Commit ad1acb57 authored by thakis@chromium.org's avatar thakis@chromium.org

Add a few missing "typename"s.

No functionality change. Just makes the code more valid C++ (clang complains).

BUG=none
TEST=none


Review URL: http://codereview.chromium.org/10224001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133945 0039d316-1c4b-4281-b951-d872f2087c98
parent 1659b49b
...@@ -828,12 +828,13 @@ static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes) { ...@@ -828,12 +828,13 @@ static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes) {
template<class T> template<class T>
static HGLOBAL CopyStringToGlobalHandle(const T& payload) { static HGLOBAL CopyStringToGlobalHandle(const T& payload) {
int bytes = static_cast<int>(payload.size() + 1) * sizeof(T::value_type); int bytes =
static_cast<int>(payload.size() + 1) * sizeof(typename T::value_type);
HANDLE handle = GlobalAlloc(GPTR, bytes); HANDLE handle = GlobalAlloc(GPTR, bytes);
void* data = GlobalLock(handle); void* data = GlobalLock(handle);
size_t allocated = static_cast<size_t>(GlobalSize(handle)); size_t allocated = static_cast<size_t>(GlobalSize(handle));
memcpy(data, payload.c_str(), allocated); memcpy(data, payload.c_str(), allocated);
static_cast<T::value_type*>(data)[payload.size()] = '\0'; static_cast<typename T::value_type*>(data)[payload.size()] = '\0';
GlobalUnlock(handle); GlobalUnlock(handle);
return handle; return handle;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment