Bug 1500047 - Port bug 1486554: Make conversion CTORs explicit in Windows-only code, take 2. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Thu, 18 Oct 2018 21:21:09 +0200
changeset 33408 fe6493684a2e0e019ef4d69800b7931db3d9845e
parent 33407 2506123465df5501cec105ead8607b241d1f4cbd
child 33409 eb34ed5966a0988254f154696eadf14c6c42a680
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1500047, 1486554
Bug 1500047 - Port bug 1486554: Make conversion CTORs explicit in Windows-only code, take 2. rs=bustage-fix
mailnews/import/outlook/src/rtfDecoder.cpp
--- a/mailnews/import/outlook/src/rtfDecoder.cpp
+++ b/mailnews/import/outlook/src/rtfDecoder.cpp
@@ -102,17 +102,17 @@ struct GlobalState {
   Fonttbl fonttbl;
   StateStack stack;
   unsigned int codepage; // defined by \ansi, \mac, \pc, \pca, and \ansicpgN
   int deff;
   std::stringstream pcdata_a;
   unsigned int pcdata_a_codepage;
   Pcdata_state pcdata_a_state;
 
-  GlobalState(std::istream& s)
+  explicit GlobalState(std::istream& s)
     : stream(s), codepage(CP_ACP), deff(-1), pcdata_a_state(pcdsno)
   {
     LocalState st;
     st.fonttbl = false;
     st.f = -1;
     st.uc = 1;
     st.codepage = 0xFFFFFFFF;
     stack.push(st);
@@ -140,17 +140,17 @@ struct Keyword {
   bool hasVal;
   int val;
 };
 
 class Lexem {
 public:
   enum Type {ltGroupBegin, ltGroupEnd, ltKeyword, ltPCDATA_A, ltPCDATA_W,
              ltBDATA, ltEOF, ltError};
-  Lexem(Type t=ltError) : m_type(t) {}
+  explicit Lexem(Type t=ltError) : m_type(t) {}
   Lexem(Lexem& from)
   {
     switch (m_type = from.m_type) {
     case ltKeyword:
       m_keyword = from.m_keyword;
       break;
     case ltPCDATA_A:
       m_pcdata_a = from.m_pcdata_a;