mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Fixed warning about comparing signed and unsigned integer types
This commit is contained in:
@@ -34,7 +34,7 @@ void Morse::setEncodeInputString(std::string input){
|
||||
//Make sure the input is empty to begin
|
||||
std::string temp;
|
||||
//Step through every element in input, removing anything that is not a letter and making all letters uppercase
|
||||
for(int cnt = 0;cnt < input.size();++cnt){
|
||||
for(unsigned int cnt = 0;cnt < input.size();++cnt){
|
||||
char letter = input[cnt];
|
||||
//If it is a letter or number add it to the inputString, turning all letters capital
|
||||
if(isalnum(letter)){
|
||||
@@ -54,7 +54,7 @@ void Morse::setEncodeInputString(std::string input){
|
||||
void Morse::setDecodeInputString(std::string input){
|
||||
std::string temp;
|
||||
//Step through every element in input, removing everything except . or -
|
||||
for(int cnt = 0;cnt < input.size();++cnt){
|
||||
for(unsigned int cnt = 0;cnt < input.size();++cnt){
|
||||
char letter = input[cnt];
|
||||
//If it is a letter or number add it to the inputString, turning all letters capital
|
||||
if(letter == '.' || letter == '-' || letter == ' '){
|
||||
@@ -95,7 +95,7 @@ std::string Morse::encode(){
|
||||
std::string temp = inputString.str();
|
||||
//Loop through every element in the input string and see what type it is
|
||||
//while(!inputString.eof()){
|
||||
for(int cnt = 0;cnt < temp.size();++cnt){
|
||||
for(unsigned int cnt = 0;cnt < temp.size();++cnt){
|
||||
char letter;
|
||||
//Get the next character in the input
|
||||
letter = temp[cnt];
|
||||
|
||||
Reference in New Issue
Block a user