aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-17 00:55:11 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-17 00:55:11 +0200
commitda04598319bf3ab9d240bbec993222623a4ab85d (patch)
tree5badb5de8abd1dd16f847d3c59a4e0d6a9e011e9
parent03fe36165b6767bc4e0d26bf1b1de38fdff3f75e (diff)
downloadEpisodeBrowser-da04598319bf3ab9d240bbec993222623a4ab85d.tar.gz
Remove TsmFromSz.
If needed in the future, it is possible to simply copy it from the Git history.
-rw-r--r--c/common.cpp20
-rw-r--r--c/common.h3
2 files changed, 0 insertions, 23 deletions
diff --git a/c/common.cpp b/c/common.cpp
index c7ea873..02feecf 100644
--- a/c/common.cpp
+++ b/c/common.cpp
@@ -1,27 +1,7 @@
-#include <stdexcept>
-#include <memory>
#include <windows.h>
-#include <SWI-Prolog.h>
#include "common.h"
-/* Convert normal string to TSTR using given codepage. */
-std::basic_string<TCHAR> TsmFromSz(const char *sz, int iCp)
-{
-#ifdef UNICODE
- int cbMultiByte, cchWideChar;
-
- cbMultiByte = strlen(sz)+1;
- cchWideChar = MultiByteToWideChar(iCp, 0, sz, cbMultiByte, NULL, 0);
- std::wstring wsm(cchWideChar, 0);
- if (!MultiByteToWideChar(iCp, 0, sz, cbMultiByte, wsm.data(), cchWideChar))
- throw Win32Error(GetLastError());
- return wsm;
-#else
- return std::string(sz);
-#endif
-}
-
Win32Error::Win32Error(DWORD dwErr)
{
m_dwErr = dwErr;
diff --git a/c/common.h b/c/common.h
index 4b28360..76f3d6e 100644
--- a/c/common.h
+++ b/c/common.h
@@ -3,7 +3,6 @@
#include <memory>
#include <optional>
-#include <stdexcept>
#include <windows.h>
#ifdef UNICODE
@@ -12,8 +11,6 @@
#define WA "A"
#endif
-std::basic_string<TCHAR> TsmFromSz(const char *, int);
-
struct Win32Error : public std::exception
{
Win32Error(DWORD);