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

Unified Diff: src/plugin/COM_Value.cpp

Issue 6650591174459392: Issues #276, #1163 - introduce class IncomingParam (Closed)
Patch Set: Created July 25, 2014, 11:27 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
Index: src/plugin/COM_Value.cpp
===================================================================
--- a/src/plugin/COM_Value.cpp
+++ b/src/plugin/COM_Value.cpp
@@ -62,3 +62,27 @@
}
return std::wstring( bstr, SysStringLen( bstr ) );
}
+
+
+namespace
+{
+ /**
+ * Pre-construction assistant for wstring_Incoming_Param.
+ *
+ * Because wstring_Incoming_Param is a derived class,
+ * we need to have a wstring value to initialize the base class.
+ */
+ std::wstring construct_Incoming_Param( BSTR b )
+ {
+ if ( !b )
+ {
+ return std::wstring();
+ }
+ return std::wstring( b, SysStringLen( b ) );
+ }
+}
+
+Incoming_Param::Incoming_Param( BSTR b )
+ : std::wstring( construct_Incoming_Param( b ) )
+{
+}

Powered by Google App Engine
This is Rietveld