Applied patch #484508 (mostly sample warnings).

I've no idea why CVS thinks that the .mcp files have been changed - they haven't.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-11-22 12:58:44 +00:00
parent 780bb8744b
commit bbb8f29b4a
4 changed files with 41 additions and 34 deletions

View File

@@ -22,6 +22,7 @@
#endif #endif
#include "wx/image.h" #include "wx/image.h"
#include "wx/sysopt.h"
#include "wx/html/htmlwin.h" #include "wx/html/htmlwin.h"
#include "wx/html/htmlproc.h" #include "wx/html/htmlproc.h"
#include "wx/fs_inet.h" #include "wx/fs_inet.h"
@@ -131,7 +132,8 @@ class BoldProcessor : public wxHtmlProcessor
bool MyApp::OnInit() bool MyApp::OnInit()
{ {
wxLog::AddTraceMask(wxT("strconv")); wxLog::AddTraceMask(wxT("strconv"));
wxSystemOptions::SetOption(wxT("no-maskblt"), 1);
wxInitAllImageHandlers(); wxInitAllImageHandlers();
#if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS #if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
wxFileSystem::AddHandler(new wxInternetFSHandler); wxFileSystem::AddHandler(new wxInternetFSHandler);

View File

@@ -128,9 +128,9 @@ static void read_srfs(FILE *f, int nbytes, lwObject *lwo)
nbytes -= read_string(f,material->name); nbytes -= read_string(f,material->name);
/* defaults */ /* defaults */
material->r = 0.7; material->r = 0.7f;
material->g = 0.7; material->g = 0.7f;
material->b = 0.7; material->b = 0.7f;
} }
lwo->material = (lwMaterial*) realloc(lwo->material, sizeof(lwMaterial)*lwo->material_cnt); lwo->material = (lwMaterial*) realloc(lwo->material, sizeof(lwMaterial)*lwo->material_cnt);
} }

View File

@@ -59,7 +59,7 @@
* simple example, though, so that is left as an Exercise for the * simple example, though, so that is left as an Exercise for the
* Programmer. * Programmer.
*/ */
#define TRACKBALLSIZE (0.8) #define TRACKBALLSIZE (0.8f)
/* /*
* Local function prototypes (not defined in trackball.h) * Local function prototypes (not defined in trackball.h)
@@ -113,7 +113,7 @@ vcross(const float *v1, const float *v2, float *cross)
float float
vlength(const float *v) vlength(const float *v)
{ {
return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); return (float) sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
} }
void void
@@ -127,7 +127,7 @@ vscale(float *v, float div)
void void
vnormal(float *v) vnormal(float *v)
{ {
vscale(v,1.0/vlength(v)); vscale(v, 1.0f/vlength(v));
} }
float float
@@ -175,8 +175,8 @@ trackball(float q[4], float p1x, float p1y, float p2x, float p2y)
* First, figure out z-coordinates for projection of P1 and P2 to * First, figure out z-coordinates for projection of P1 and P2 to
* deformed sphere * deformed sphere
*/ */
vset(p1,p1x,p1y,tb_project_to_sphere(TRACKBALLSIZE,p1x,p1y)); vset(p1, p1x, p1y, tb_project_to_sphere(TRACKBALLSIZE, p1x, p1y));
vset(p2,p2x,p2y,tb_project_to_sphere(TRACKBALLSIZE,p2x,p2y)); vset(p2, p2x, p2y, tb_project_to_sphere(TRACKBALLSIZE, p2x, p2y));
/* /*
* Now, we want the cross product of P1 and P2 * Now, we want the cross product of P1 and P2
@@ -186,15 +186,15 @@ trackball(float q[4], float p1x, float p1y, float p2x, float p2y)
/* /*
* Figure out how much to rotate around that axis. * Figure out how much to rotate around that axis.
*/ */
vsub(p1,p2,d); vsub(p1, p2, d);
t = vlength(d) / (2.0*TRACKBALLSIZE); t = vlength(d) / (2.0f*TRACKBALLSIZE);
/* /*
* Avoid problems with out-of-control values... * Avoid problems with out-of-control values...
*/ */
if (t > 1.0) t = 1.0; if (t > 1.0) t = 1.0;
if (t < -1.0) t = -1.0; if (t < -1.0) t = -1.0;
phi = 2.0 * asin(t); phi = 2.0f * (float) asin(t);
axis_to_quat(a,phi,q); axis_to_quat(a,phi,q);
} }
@@ -206,9 +206,9 @@ void
axis_to_quat(float a[3], float phi, float q[4]) axis_to_quat(float a[3], float phi, float q[4])
{ {
vnormal(a); vnormal(a);
vcopy(a,q); vcopy(a, q);
vscale(q,sin(phi/2.0)); vscale(q, (float) sin(phi/2.0));
q[3] = cos(phi/2.0); q[3] = (float) cos(phi/2.0);
} }
/* /*
@@ -220,11 +220,11 @@ tb_project_to_sphere(float r, float x, float y)
{ {
float d, t, z; float d, t, z;
d = sqrt(x*x + y*y); d = (float) sqrt(x*x + y*y);
if (d < r * 0.70710678118654752440) { /* Inside sphere */ if (d < r * 0.70710678118654752440) { /* Inside sphere */
z = sqrt(r*r - d*d); z = (float) sqrt(r*r - d*d);
} else { /* On hyperbola */ } else { /* On hyperbola */
t = r / 1.41421356237309504880; t = r / 1.41421356237309504880f;
z = t*t / d; z = t*t / d;
} }
return z; return z;
@@ -301,24 +301,24 @@ normalize_quat(float q[4])
void void
build_rotmatrix(float m[4][4], float q[4]) build_rotmatrix(float m[4][4], float q[4])
{ {
m[0][0] = 1.0 - 2.0 * (q[1] * q[1] + q[2] * q[2]); m[0][0] = 1.0f - 2.0f * (q[1] * q[1] + q[2] * q[2]);
m[0][1] = 2.0 * (q[0] * q[1] - q[2] * q[3]); m[0][1] = 2.0f * (q[0] * q[1] - q[2] * q[3]);
m[0][2] = 2.0 * (q[2] * q[0] + q[1] * q[3]); m[0][2] = 2.0f * (q[2] * q[0] + q[1] * q[3]);
m[0][3] = 0.0; m[0][3] = 0.0f;
m[1][0] = 2.0 * (q[0] * q[1] + q[2] * q[3]); m[1][0] = 2.0f * (q[0] * q[1] + q[2] * q[3]);
m[1][1]= 1.0 - 2.0 * (q[2] * q[2] + q[0] * q[0]); m[1][1]= 1.0f - 2.0f * (q[2] * q[2] + q[0] * q[0]);
m[1][2] = 2.0 * (q[1] * q[2] - q[0] * q[3]); m[1][2] = 2.0f * (q[1] * q[2] - q[0] * q[3]);
m[1][3] = 0.0; m[1][3] = 0.0f;
m[2][0] = 2.0 * (q[2] * q[0] - q[1] * q[3]); m[2][0] = 2.0f * (q[2] * q[0] - q[1] * q[3]);
m[2][1] = 2.0 * (q[1] * q[2] + q[0] * q[3]); m[2][1] = 2.0f * (q[1] * q[2] + q[0] * q[3]);
m[2][2] = 1.0 - 2.0 * (q[1] * q[1] + q[0] * q[0]); m[2][2] = 1.0f - 2.0f * (q[1] * q[1] + q[0] * q[0]);
m[2][3] = 0.0; m[2][3] = 0.0f;
m[3][0] = 0.0; m[3][0] = 0.0f;
m[3][1] = 0.0; m[3][1] = 0.0f;
m[3][2] = 0.0; m[3][2] = 0.0f;
m[3][3] = 1.0; m[3][3] = 1.0f;
} }

View File

@@ -24,6 +24,11 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if !wxUSE_PROPSHEET
#error Please set wxUSE_PROPSHEET to 1 in include/wx/msw/setup.h and recompile.
#endif
#include "proplist.h" #include "proplist.h"
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)