# HG changeset patch
# User Adrian Buehlmann <[email protected]>
# Date 1242343330 -7200
# Node ID fcc8b13ec20d8a9f4285adfd15ced15ffbcaa690
# Parent  740b548daa935b593b66f7a09f9e081d809d10ea
shellext: kill local string var

diff --git a/win32/shellext/TortoiseUtils.cpp b/win32/shellext/TortoiseUtils.cpp
--- a/win32/shellext/TortoiseUtils.cpp
+++ b/win32/shellext/TortoiseUtils.cpp
@@ -90,12 +90,12 @@ std::string GetTHgProgRoot()
 
 int GetRegistryConfig(const std::string& name, std::string& res)
 {
-    std::string subkey = "Software\\TortoiseHg";
+    const char* const subkey = "Software\\TortoiseHg";
+
     HKEY hkey = 0;
+    LONG rv = RegOpenKeyExA(
+        HKEY_CURRENT_USER, subkey, 0, KEY_READ, &hkey);
 
-    LONG rv = RegOpenKeyExA(
-        HKEY_CURRENT_USER, subkey.c_str(), 0, KEY_READ, &hkey);
-    
     if (rv != ERROR_SUCCESS || hkey == 0)
         return 0;
 

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to