Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/ATL_Deprecate.h

Issue 5070706781978624: Issue #276 - introduce class BSTR_Argument (Closed)
Patch Set: small correction over patch set 2 Created July 29, 2014, 7:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/ATL_Deprecate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/ATL_Deprecate.h
===================================================================
--- a/src/plugin/ATL_Deprecate.h
+++ b/src/plugin/ATL_Deprecate.h
@@ -128,6 +128,7 @@
#else
namespace OLD_ATL {
#endif
+#pragma deprecated( CComBSTR )
#pragma deprecated( CRect )
#pragma deprecated( CSimpleArray )
}
@@ -141,3 +142,33 @@
* ATLTRACE resolves to a ATL::CTraceFileAndLineInfo.
* These will need to be replaced or removed.
*/
+
+
+/*
+ * Transient functions used during the ATL removal process.
+ *
+ * Trying to convert all the string instances at once leads to massive change sets.
+ * In order to be able to convert incrementally, we'll need to undergo a period where we're mixing types.
+ * The functions below are explicit conversion functions.
+ * While it's possible to convert them by direct calls to member functions,
+ * using explicit conversion functions will allow us to ensure we've removed all the conversions when we're done.
+ *
+ * These are declared in ATL_Deprecate.h to ensure that they're all removed before we ATL removal is complete.
+ *
+ * Reference:
+ * MSDN CString http://msdn.microsoft.com/en-us/library/aa300688%28v=vs.60%29.aspx
+ */
+
+#include <string>
+/**
+ * Conversion function from ATL:CString to std::wstring
+ *
+ * The argument cannot be declared 'const' because of the CString API.
+ * Reference argument usually does not require explicit temporaries.
+ */
+std::wstring to_wstring(ATL::CString& s);
+
+/**
+ * Conversion function from std::wstring to ATL::CString
+ */
+ATL::CString to_CString(const std::wstring& s);
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/ATL_Deprecate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld