Windows Shell Integration: Fix warnings

This commit is contained in:
Daniel Molkentin 2015-01-29 12:59:20 +01:00
parent 43d6dbb0f2
commit 367ef7195a
5 changed files with 6 additions and 8 deletions

View file

@ -12,7 +12,7 @@
* details.
*/
#include "stdafx.h"
#include "OCClientInterface.h"
@ -28,7 +28,6 @@
#include <sstream>
#include <iterator>
#include <unordered_set>
#include <cassert>
using namespace std;

View file

@ -16,7 +16,7 @@
#define OCCONTEXTMENU_H
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlobj.h> // For IShellExtInit and IContextMenu
#include <memory>

View file

@ -19,7 +19,6 @@
#pragma once
#include <unknwn.h> // For IClassFactory
#include <minwindef.h>
class OCContextMenuFactory : public IClassFactory
{

View file

@ -17,7 +17,7 @@
#include "StringUtil.h"
std::string StringUtil::toUtf8(const wchar_t *utf16, int len)
std::string StringUtil::toUtf8(const wchar_t *utf16, size_t len)
{
if (len < 0) {
len = wcslen(utf16);
@ -26,7 +26,7 @@ std::string StringUtil::toUtf8(const wchar_t *utf16, int len)
return converter.to_bytes(utf16, utf16+len);
}
std::wstring StringUtil::toUtf16(const char *utf8, int len)
std::wstring StringUtil::toUtf16(const char *utf8, size_t len)
{
if (len < 0) {
len = strlen(utf8);

View file

@ -20,8 +20,8 @@
class __declspec(dllexport) StringUtil {
public:
static std::string toUtf8(const wchar_t* utf16, int len = -1);
static std::wstring toUtf16(const char* utf8, int len = -1);
static std::string toUtf8(const wchar_t* utf16, size_t len = -1);
static std::wstring toUtf16(const char* utf8, size_t len = -1);
template<class T>
static bool begins_with(const T& input, const T& match)