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

Side by Side Diff: src/plugin/ATL_Deprecate.h

Issue 29347788: Issue #1234 - Remove transitional conversion functions for CString (Closed)
Patch Set: Created July 15, 2016, 6:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 /* 150 /*
151 * Note: 151 * Note:
152 * The preprocessor symbols ATLASSERT and ATLTRACE appear in the source. 152 * The preprocessor symbols ATLASSERT and ATLTRACE appear in the source.
153 * These resolve to nothing in Release configurations. 153 * These resolve to nothing in Release configurations.
154 * In Debug configurations, these are non-trivial. 154 * In Debug configurations, these are non-trivial.
155 * ATLASSERT resolves to an expression with _CrtDbgReportW and _CrtDbgBreak. 155 * ATLASSERT resolves to an expression with _CrtDbgReportW and _CrtDbgBreak.
156 * ATLTRACE resolves to a ATL::CTraceFileAndLineInfo. 156 * ATLTRACE resolves to a ATL::CTraceFileAndLineInfo.
157 * These will need to be replaced or removed. 157 * These will need to be replaced or removed.
158 */ 158 */
159
160
161 /*
162 * Transient functions used during the ATL removal process.
163 *
164 * Trying to convert all the string instances at once leads to massive change se ts.
165 * In order to be able to convert incrementally, we'll need to undergo a period where we're mixing types.
166 * The functions below are explicit conversion functions.
167 * While it's possible to convert them by direct calls to member functions,
168 * using explicit conversion functions will allow us to ensure we've removed a ll the conversions when we're done.
169 *
170 * These are declared in ATL_Deprecate.h to ensure that they're all removed befo re we ATL removal is complete.
171 *
172 * Reference:
173 * MSDN CString http://msdn.microsoft.com/en-us/library/aa300688%28v=vs.60%29. aspx
174 */
175
176 #include <string>
177 /**
178 * Conversion function from ATL:CString to std::wstring
179 *
180 * The argument cannot be declared 'const' because of the CString API.
181 * Reference argument usually does not require explicit temporaries.
182 */
183 std::wstring ToWstring(const ATL::CString& s);
184 std::wstring to_wstring(const ATL::CString& s);
185
186 /**
187 * Conversion function from std::wstring to ATL::CString
188 */
189 ATL::CString ToCString(const std::wstring& s);
190 ATL::CString to_CString(const std::wstring& s);
OLDNEW

Powered by Google App Engine
This is Rietveld