Index: src/plugin/PluginUtil.cpp |
diff --git a/src/plugin/PluginUtil.cpp b/src/plugin/PluginUtil.cpp |
index a077d4e7e6058fa0cd1361d0ace6ad8f0e3597d8..8b4aa33ba719a02f2042c22f6cefa2f928b9e98a 100644 |
--- a/src/plugin/PluginUtil.cpp |
+++ b/src/plugin/PluginUtil.cpp |
@@ -28,3 +28,14 @@ std::wstring FileUrl(const std::wstring& path) |
std::replace(url.begin(), url.end(), L'\\', L'/'); |
return L"file:///" + url; |
} |
+ |
+std::wstring GetLocationUrl(IWebBrowser2& browser) |
+{ |
+ std::wstring retValue; |
Eric
2015/01/13 17:04:20
Use of this variable requires extraneous assignmen
sergei
2015/01/29 12:42:11
I've changed the body of this function and removed
|
+ ATL::CComBSTR locationUrl; |
+ if (SUCCEEDED(browser.get_LocationURL(&locationUrl)) && !!locationUrl) |
Eric
2015/01/13 17:04:20
No need for double negation. Testing a converted p
|
+ { |
+ retValue.assign(locationUrl, locationUrl.Length()); |
Eric
2015/01/13 17:04:20
return std::wstring(locationUrl, locationUrl.Lengt
|
+ } |
+ return retValue; |
Eric
2015/01/13 17:04:20
return L"";
-- or --
return std:;wstring();
|
+} |