FT1.1 code clean up

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

FT1.1 code clean up

Post #1by John Van Vliet » 21.10.2005, 05:23

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;







Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Post #2by Joe » 21.10.2005, 07:21

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;
}
*/
Joe
8O

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #3by steffens » 21.10.2005, 12:35

I guess these lines were commented out? After looking closely I noticed /* and */.

steffens

Avatar
Topic author
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

re

Post #4by John Van Vliet » 01.11.2005, 03:36

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.


Return to “Development”