Opened on 08/14/2014 at 10:24:02 PM

Last modified on 12/22/2016 at 03:18:07 AM

#1234 new change

[Stop using ATL] Replace ATL::CString with std::wstring

Reported by: eric@adblockplus.org Assignee: eric@…
Priority: P4 Milestone: Adblock-Plus-for-Internet-Explorer-Next
Module: Adblock-Plus-for-Internet-Explorer Keywords:
Cc: oleksandr@adblockplus.org Blocked By:
Blocking: #276 Platform: Internet Explorer
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

http://codereview.adblockplus.org/6523237609504768/
http://codereview.adblockplus.org/6224768520945664/
http://codereview.adblockplus.org/4772743157383168/
http://codereview.adblockplus.org/5516878722105344/
http://codereview.adblockplus.org/5163396739629056/
http://codereview.adblockplus.org/4895405913407488/
http://codereview.adblockplus.org/6288156869525504/
http://codereview.adblockplus.org/4912420225024000/
http://codereview.adblockplus.org/5491870822039552/
http://codereview.adblockplus.org/5747779603267584/
https://codereview.adblockplus.org/5670602698391552/
https://codereview.adblockplus.org/5187613258416128/
https://codereview.adblockplus.org/29330625/
https://codereview.adblockplus.org/29330618/
https://codereview.adblockplus.org/29332057/
https://codereview.adblockplus.org/29331767/
https://codereview.adblockplus.org/29331055/
https://codereview.adblockplus.org/29332775/
https://codereview.adblockplus.org/29323611/
https://codereview.adblockplus.org/29347788/

Description

Background

We are using ATL::CString extensively. It offers no substantive advantages over std::wstring. Its use induces a lot of clutter in the form of not-very-necessary type conversions.

What to change

Replace all uses of CString with std::wstring. While not particularly technically difficult, there are a few complications.

  • There are a handful of CString member functions that don't have equivalents in wstring. These require replacement.
  • It's not possible to perform the conversion all at once. During the interim, we'll using explicit conversion functions that mark the boundary of progress for this change.
  • The logging functions for debug use CString at present but will require both wstring and string signatures after conversion. Most will use the wstring version, but std::exception::what() uses string. It's expedient to make a small exception here.

Attachments (0)

Change History (18)

comment:1 Changed on 08/15/2014 at 05:38:11 AM by fhd

  • Priority changed from Unknown to P4
  • Ready set
  • Review URL(s) modified (diff)

comment:2 Changed on 08/15/2014 at 05:39:56 AM by fhd

  • Summary changed from Replace ATL::CString with std::wstring to [Stop using ATL} Replace ATL::CString with std::wstring

comment:3 Changed on 08/15/2014 at 05:40:56 AM by fhd

  • Summary changed from [Stop using ATL} Replace ATL::CString with std::wstring to [Stop using ATL] Replace ATL::CString with std::wstring

comment:4 Changed on 10/01/2014 at 06:44:45 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:5 Changed on 10/22/2014 at 12:03:18 AM by oleksandr

  • Cc oleksandr@adblockplus.org added
  • Owner set to eric@…

comment:6 Changed on 01/13/2015 at 03:06:01 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:7 Changed on 01/13/2015 at 05:31:13 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:8 Changed on 02/24/2015 at 02:31:25 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:9 Changed on 10/08/2015 at 07:33:47 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)
  • Tester set to Unknown

comment:10 Changed on 11/25/2015 at 04:06:29 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:11 Changed on 11/26/2015 at 12:50:03 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:12 Changed on 12/14/2015 at 04:13:43 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:13 Changed on 01/05/2016 at 02:09:22 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:14 Changed on 01/05/2016 at 02:13:24 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:15 Changed on 01/05/2016 at 04:04:41 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

comment:16 Changed on 07/27/2016 at 08:32:32 PM by eric@adblockplus.org

  • Review URL(s) modified (diff)

As of the commit of https://codereview.adblockplus.org/29347788/, the only remaining uses of CString are in the threading code for deferred log writes.

comment:17 Changed on 11/21/2016 at 10:50:19 AM by oleksandr

  • Milestone set to Adblock-Plus-for-Internet-Explorer-Next

comment:18 Changed on 12/22/2016 at 03:18:07 AM by oleksandr

  • Milestone changed from Adblock-Plus-for-Internet-Explorer-1.6 to Adblock-Plus-for-Internet-Explorer-Next

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from eric@….
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.