]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 12 Nov 2004 14:23:02 +0000 (14:23 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 12 Nov 2004 14:23:02 +0000 (14:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/zipstrm.h
samples/mediaplayer/mediaplayer.cpp

index 7b83d0bc0b122773ec43c4f7cecf229f61b850bd..1ecc46718ddb299c7f94cc6e41889606ee8944d1 100644 (file)
@@ -164,7 +164,7 @@ public:
     // set accessors
     void SetDateTime(const wxDateTime& dt)      { m_DateTime = dt; }
     void SetSize(wxFileOffset size)             { m_Size = size; }
-    void SetMethod(int method)                  { m_Method = method; }
+    void SetMethod(int method)                  { m_Method = (wxUint16)method; }
     void SetComment(const wxString& comment)    { m_Comment = comment; }
     void SetExternalAttributes(wxUint32 attr )  { m_ExternalAttributes = attr; }
     void SetSystemMadeBy(int system);
@@ -200,15 +200,15 @@ protected:
     int GetDiskStart() const                    { return m_DiskStart; }
     int GetInternalAttributes() const           { return m_InternalAttributes; }
 
-    void SetVersionNeeded(int version)          { m_VersionNeeded = version; }
+    void SetVersionNeeded(int version)          { m_VersionNeeded = (wxUint16)version; }
     void SetOffset(wxFileOffset offset)         { m_Offset = offset; }
-    void SetFlags(int flags)                    { m_Flags = flags; }
-    void SetVersionMadeBy(int version)          { m_VersionMadeBy = version; }
+    void SetFlags(int flags)                    { m_Flags = (wxUint16)flags; }
+    void SetVersionMadeBy(int version)          { m_VersionMadeBy = (wxUint8)version; }
     void SetCrc(wxUint32 crc)                   { m_Crc = crc; }
     void SetCompressedSize(wxFileOffset size)   { m_CompressedSize = size; }
     void SetKey(wxFileOffset offset)            { m_Key = offset; }
-    void SetDiskStart(int start)                { m_DiskStart = start; }
-    void SetInternalAttributes(int attr)        { m_InternalAttributes = attr; }
+    void SetDiskStart(int start)                { m_DiskStart = (wxUint16)start; }
+    void SetInternalAttributes(int attr)        { m_InternalAttributes = (wxUint16)attr; }
 
     virtual wxZipEntry *ZipClone() const        { return new wxZipEntry(*this); }
 
index 8a4756a2226e481a5d68af60b7fc04e65c37e4d6..b8ca9a9f3e6daa8c3e2721e3cd051e8fd0c32d18 100644 (file)
@@ -102,13 +102,13 @@ private:
 //
 void MyFrame::ResetStatus()
 {
-    m_basestatus = wxString::Format(_T("Size(x,y):%i,%i Length(Seconds):%u Speed:%1.1fx"), 
-    m_mediactrl->GetBestSize().x, 
-    m_mediactrl->GetBestSize().y, 
-    m_mediactrl->GetDuration() / 1000,
+    m_basestatus = wxString::Format(_T("Size(x,y):%i,%i Length(Seconds):%u Speed:%1.1fx"),
+    m_mediactrl->GetBestSize().x,
+    m_mediactrl->GetBestSize().y,
+    (unsigned)(m_mediactrl->GetDuration() / 1000),
     m_mediactrl->GetPlaybackRate()
     );
-    
+
     m_slider->SetRange(0, m_mediactrl->GetDuration() / 1000);
 }
 
@@ -147,15 +147,13 @@ public:
     {
         long lPosition = m_frame->m_mediactrl->GetPosition() / 1000;
         m_frame->m_slider->SetValue(lPosition);
-            
 
         m_frame->SetStatusText(wxString::Format(_T("%s Pos:%u State:%s"),
-                                    m_frame->m_basestatus.c_str(), 
-                                    lPosition,
+                                    m_frame->m_basestatus.c_str(),
+                                    (unsigned int)lPosition,
                                     wxGetMediaStateText(m_frame->m_mediactrl->GetState())
                                                 )
                                );
-    
     }
 
     MyFrame* m_frame;
@@ -268,7 +266,7 @@ MyFrame::MyFrame(const wxString& title)
     //  Create and attach the first/main sizer
     //
 
-    m_sizer = new wxBoxSizer(wxVERTICAL); 
+    m_sizer = new wxBoxSizer(wxVERTICAL);
     this->SetSizer(m_sizer);
     this->SetAutoLayout(true);
 
@@ -284,16 +282,16 @@ MyFrame::MyFrame(const wxString& title)
     //
 
     m_slider = new wxSlider(this, Minimal_Slider, 0, //init
-                            0, //start 
-                            0, //end 
-                            wxDefaultPosition, wxDefaultSize, 
+                            0, //start
+                            0, //end
+                            wxDefaultPosition, wxDefaultSize,
                             wxSL_HORIZONTAL );
     m_sizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);
 
 
     //
     //  Create the second sizer which will position things
-    //  vertically - 
+    //  vertically -
     //
     //  -------Menu----------
     //  [m_mediactrl]
@@ -392,8 +390,8 @@ void MyFrame::OnOpenFile(wxCommandEvent& WXUNUSED(event))
             wxMessageBox(wxT("Couldn't load file!"));
 
         if( !m_mediactrl->Play() )
-            wxMessageBox(wxT("Couldn't play movie!"));            
-            
+            wxMessageBox(wxT("Couldn't play movie!"));
+
         ResetStatus();
     }
 }
@@ -463,4 +461,4 @@ void MyFrame::OnMediaFinished(wxMediaEvent& WXUNUSED(event))
         if ( !m_mediactrl->Play() )
             wxMessageBox(wxT("Couldn't loop movie!"));
     }
-}
\ No newline at end of file
+}