Minor code cleanup.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "DrawingPrimitives.h"
|
||||
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
using namespace glbarcode::Constants;
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
return codewords.size();
|
||||
return int( codewords.size() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user