Page 1 of 1

FT1.1 code clean up

Posted: 21.10.2005, 05:23
by John Van Vliet
hi below is a list of changes to the code to remove warnings
for win (visual stuido.net ) all but celengine and celestia build without warnings

for linux cel3ds celmath and cleutil build with out most warnings
i have NOT looked into the warning about nonvirtual destructors


Code: Select all

BigFix.cpp
...................................................
-----
line 147
BigFix operator* (BigFix a, BigFix b)
{
return BigFix();
}
new
/*
BigFix operator* (BigFix a, BigFix b)
{
return BigFix();
}
*/
-----
line 196
int i,bits,c,char_count,errors=0;
new
 int i,bits,c,char_count;

3dsread.cpp
............................................................
-----
line 118
void logChunk (unit16 chunkType,int chunkSize)
new
 logChunk (unit16 chunkType,int)
-----
line #251
 M3DColor readColor(ifstream& in, int nBytes)
new
 M3DColor readColor(ifstream& in, int)
-----
line 263
M3DColor readFloatColor(ifstream& in, int nBytes)
new
 M3DColor readFloatColor(ifstream& in, int)
-----
line 275
Mat4f readMeshMatrix(ifstream& in, int nBytes)
new
 Mat4f readMeshMatrix(ifstream& in, int)
-----
line 303
bool stubProcessChunk(ifstream& in,
                      unsigned short chunkType,
                      int contentSize,
                      void* obj)
{
    return false;
}
new
/*
bool stubProcessChunk(ifstream& in,
                      unsigned short chunkType,
                      int contentSize,
                      void* obj)
{
    return false;
}
*/
-----
line 342
int contentSize,
new
 int,
-----
line 488
int contentSize,
new
 int,
-----
line 512
int contentSize,
new
 int,
-----
..........................................................
astro.cpp
-----
line 175
float astro::sphereIlluminationFraction(Point3d spherePos,
                                        Point3d viewerPos)
{
    return 1.0f;
}

new
/*
float astro::sphereIlluminationFraction(Point3d spherePos,
                                        Point3d viewerPos)
{
    return 1.0f;
}
*/
.......................................................
command.h
-----
line 38
void process(ExecutionEnvironment& env, double t, double dt)
new
void process(ExecutionEnvironment& env, double, double)
......................................................

texturefont.h
---
line 59
short xoff;
new
float xoff;
---
line 61
short yoff;
new
float yoff;
------
line 81
float texWidth;
new
int texWidth;


.........................................

texturefont.cpp

------

line 351,352

float fWidth = texWidth;
float fHeight = texHeight;
new

int fWidth = texWidth;
int fHeight = texHeight;







Posted: 21.10.2005, 07:21
by Joe
Very useful, but for some of the code, it seems no difference between the old and new, like

Code: Select all

line 147
BigFix operator* (BigFix a, BigFix b)
{
return BigFix();
}
new
/*
BigFix operator* (BigFix a, BigFix b)
{
return BigFix();
}
*/

and

Code: Select all

-----
line 303
bool stubProcessChunk(ifstream& in,
                      unsigned short chunkType,
                      int contentSize,
                      void* obj)
{
    return false;
}
new
/*
bool stubProcessChunk(ifstream& in,
                      unsigned short chunkType,
                      int contentSize,
                      void* obj)
{
    return false;
}
*/

and

Code: Select all

-----
line 175
float astro::sphereIlluminationFraction(Point3d spherePos,
                                        Point3d viewerPos)
{
    return 1.0f;
}

new
/*
float astro::sphereIlluminationFraction(Point3d spherePos,
                                        Point3d viewerPos)
{
    return 1.0f;
}
*/

Posted: 21.10.2005, 12:35
by steffens
I guess these lines were commented out? After looking closely I noticed /* and */.

steffens

re

Posted: 01.11.2005, 03:36
by John Van Vliet
yes i comented out those lines but left them there so if neaded they can be turned back on
i almost allways leave the old code there but /* ...*/ it out until done so i can go back if neaded.