Fixed warning about comparing signed and unsigned integer types

This commit is contained in:
2018-05-13 22:26:42 -04:00
parent 0cfe5e40bd
commit 90dcd3412c
5 changed files with 18 additions and 18 deletions

View File

@@ -79,7 +79,7 @@ std::string Caesar::getOutputString() const{
*/
std::string Caesar::encode(){
char temp; //A temperary holder for the current working character
for(int cnt = 0;cnt < inputString.size();++cnt){
for(unsigned int cnt = 0;cnt < inputString.size();++cnt){
temp = inputString.at(cnt);
//If it is a upper case letter shift it and wrap if necessary
if(isupper(temp)){
@@ -130,7 +130,7 @@ std::string Caesar::encode(int shiftAmount, std::string input){
*/
std::string Caesar::decode(){
char temp;
for(int cnt = 0;cnt < inputString.size();++cnt){
for(unsigned int cnt = 0;cnt < inputString.size();++cnt){
temp = inputString.at(cnt);
//If it is an upper case letter shift it and wrap if necessary
if(isupper(temp)){