1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Toshi MARUYAMA  committed 1c302f2

shellext: remove unused GetRegSZValue.

  • Participants
  • Parent commits cb79ad6
  • Branches stable

Comments (0)

Files changed (2)

File win32/shellext/TortoiseUtils.cpp

View file
  • Ignore whitespace
 }
 
 
-// read string value from registry
-int GetRegSZValue(HKEY hkey, const char* name, std::string& res)
-{
-    res = "";
-
-    if (!hkey)
-        return 0;
-
-    std::vector<BYTE> Data(300);
-    DWORD cbData = Data.size();
-
-    LONG rv = ::RegQueryValueExA(hkey, name, 0, 0, &Data[0], &cbData);
-
-    if (rv == ERROR_SUCCESS)
-    {
-        res = reinterpret_cast<char*>(&Data[0]);
-        return 1;
-    }
-
-    TDEBUG_TRACE("GetRegSZValue(" << name << ") failed");
-
-    return 0;
-}
-
 // read string value from registry, wide version
 int GetRegSZValueW(HKEY hkey, const wchar_t* name, std::wstring& res)
 {

File win32/shellext/TortoiseUtils.h

View file
  • Ignore whitespace
 std::string GetHgRepoRoot(const std::string& path);
 bool IsHgRepo(const std::string& path);
 FILE* fopenReadRenameAllowed(const char* path);
-int GetRegSZValue(HKEY hkey, const char* name, std::string& res);
 int GetRegSZValueW(HKEY hkey, const wchar_t* name, std::wstring& res);
 bool StartsWith(const std::string& a, const std::string& b);
 void Tokenize(const std::string& str, std::vector<std::string>& tokens,