Skip to content

Commit

Permalink
Cleanup to remove warnings (and fix probably unintentional redirectio…
Browse files Browse the repository at this point in the history
…n of

matrix prints to stderr)
  • Loading branch information
phooky committed Aug 18, 2011
1 parent 0cc2d04 commit c552a3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions algebra3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,16 +1170,16 @@ void mat3::print(FILE *file, const char *name) const
{
int i, j;

fprintf( stderr, "%s:\n", name );
fprintf( file, "%s:\n", name );

for( i = 0; i < 3; i++ )
{
fprintf( stderr, " " );
fprintf( file, " " );
for( j = 0; j < 3; j++ )
{
fprintf( stderr, "%f ", v[i][j] );
fprintf( file, "%f ", v[i][j] );
}
fprintf( stderr, "\n" );
fprintf( file, "\n" );
}
}

Expand Down Expand Up @@ -1350,16 +1350,16 @@ void mat4::print(FILE *file, const char *name) const
{
int i, j;

fprintf( stderr, "%s:\n", name );
fprintf( file, "%s:\n", name );

for( i = 0; i < 4; i++ )
{
fprintf( stderr, " " );
fprintf( file, " " );
for( j = 0; j < 4; j++ )
{
fprintf( stderr, "%f ", v[i][j] );
fprintf( file, "%f ", v[i][j] );
}
fprintf( stderr, "\n" );
fprintf( file, "\n" );
}
}

Expand Down
8 changes: 4 additions & 4 deletions gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ string gcode::getComment() {


bool gcode::hasCode(char searchCode) {
for (int i = 0; i < parameters.size(); i++) {
for (unsigned int i = 0; i < parameters.size(); i++) {
if(parameters[i].code == searchCode) {
return true;
}
Expand All @@ -74,7 +74,7 @@ bool gcode::hasCode(char searchCode) {


double gcode::getCodeValue(char searchCode) {
for (int i = 0; i < parameters.size(); i++) {
for (unsigned int i = 0; i < parameters.size(); i++) {
if(parameters[i].code == searchCode) {
return parameters[i].value;
}
Expand All @@ -98,7 +98,7 @@ bool layerMap::heightLessThanLayer(int layer, float height) {

// Record that we've seen a specific z height. If it's already in the list, it is ignored, otherwise it is added.
void layerMap::recordHeight(float height) {
for (int i = 0; i < heights.size(); i++) {
for (unsigned int i = 0; i < heights.size(); i++) {
if (heightInLayer(i, height)) {
return;
}
Expand Down Expand Up @@ -141,7 +141,7 @@ void gcodeModel::exportGCode(QString filename) {
out << "(This is a G-Code file generated by Makerbot's GCode Viewer Application)\n";

float lastflowrate = FLT_MIN;
for(int i=0; i<points.size(); i++)
for(unsigned int i=0; i<points.size(); i++)
{
point data = points.at(i);

Expand Down
2 changes: 1 addition & 1 deletion gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct point {
float flowrate;

point(float x, float y, float z, float feedrate, bool toolEnabled, float flowrate) :
x(x), y(y), z(z), feedrate(feedrate), toolEnabled(toolEnabled), flowrate(flowrate) {}
x(x), y(y), z(z), toolEnabled(toolEnabled), feedrate(feedrate), flowrate(flowrate) {}


};
Expand Down

0 comments on commit c552a3d

Please sign in to comment.