Minor code cleanup.

This commit is contained in:
Jim Evins
2017-11-25 16:54:37 -05:00
parent ae76470ea9
commit c6c52a8895
11 changed files with 24 additions and 16 deletions
+1
View File
@@ -24,6 +24,7 @@
#include "DrawingPrimitives.h"
#include <list>
#include <algorithm>
using namespace glbarcode::Constants;
+3 -3
View File
@@ -142,12 +142,12 @@ namespace glbarcode
int sum = 0;
for ( unsigned int i=0; i < cookedData.size(); i++ )
{
int cValue = alphabet.find( toupper( cookedData[i] ) );
size_t cValue = alphabet.find( toupper( cookedData[i] ) );
code += symbols[cValue];
code += "i";
sum += cValue;
sum += int(cValue);
}
if ( checksum() )
@@ -190,7 +190,7 @@ namespace glbarcode
{
/* determine width and establish horizontal scale, based on original cooked data */
double dataSize = cookedData.size();
double dataSize = double( cookedData.size() );
double minL;
if ( !checksum() )
{
+1 -1
View File
@@ -294,7 +294,7 @@ namespace
}
}
return codewords.size();
return int( codewords.size() );
}
+2 -2
View File
@@ -216,7 +216,7 @@ namespace glbarcode
double& h )
{
/* determine width and establish horizontal scale */
int nModules = 7*(cookedData.size()+1) + 11;
int nModules = 7*int(cookedData.size()+1) + 11;
double scale;
if ( w == 0 )
@@ -256,7 +256,7 @@ namespace glbarcode
/* now traverse the code string and draw each bar */
int nBarsSpaces = codedData.size() - 1; /* coded data has dummy "0" on end. */
int nBarsSpaces = int( codedData.size() - 1 ); /* coded data has dummy "0" on end. */
double xModules = 0;
for ( int i = 0; i < nBarsSpaces; i += 2 )