]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/life/reader.cpp
Added support for toggle button on OS/2.
[wxWidgets.git] / demos / life / reader.cpp
index 8bb48ed375a8d9e2d516d5a8d3fd6df97500c8e4..95c10691f31790dce610d82d070a1ad4f4e67029 100644 (file)
@@ -45,9 +45,9 @@
 
 LifeReader::LifeReader(wxInputStream& is)
 {
 
 LifeReader::LifeReader(wxInputStream& is)
 {
-    wxBufferedInputStream buff_is = wxBufferedInputStream(is);
-    wxTextInputStream     text_is = wxTextInputStream(buff_is);
-    wxString              line, rest; 
+    wxBufferedInputStream buff_is(is);
+    wxTextInputStream     text_is(buff_is);
+    wxString              line, rest;
 
     // check stream
     m_ok = is.IsOk();
 
     // check stream
     m_ok = is.IsOk();
@@ -58,11 +58,11 @@ LifeReader::LifeReader(wxInputStream& is)
     LIFE_CHECKVAL(_("Error reading signature. Not a Life pattern?"));
 
     // read description
     LIFE_CHECKVAL(_("Error reading signature. Not a Life pattern?"));
 
     // read description
-    m_description = wxT("");
+    m_description = wxEmptyString;
     line = text_is.ReadLine();
     while (buff_is.IsOk() && line.StartsWith(wxT("#D"), &rest))
     {
     line = text_is.ReadLine();
     while (buff_is.IsOk() && line.StartsWith(wxT("#D"), &rest))
     {
-        m_description += rest.Trim(FALSE);
+        m_description += rest.Trim(false);
         m_description += wxT("\n");
         line = text_is.ReadLine();
     }
         m_description += wxT("\n");
         line = text_is.ReadLine();
     }
@@ -79,7 +79,7 @@ LifeReader::LifeReader(wxInputStream& is)
     {
         line = ( text_is.ReadLine() ).Trim();
 
     {
         line = ( text_is.ReadLine() ).Trim();
 
-        if (!line.IsEmpty())
+        if (!line.empty())
         {
             if (line.StartsWith(wxT("#P "), &rest))
                 m_shape.Add(rest);
         {
             if (line.StartsWith(wxT("#P "), &rest))
                 m_shape.Add(rest);