Fixed spelling errors.

This commit is contained in:
Davis King 2018-02-14 22:01:53 -05:00
parent 87aa290c04
commit f6ea3397c3
4 changed files with 20 additions and 20 deletions

View File

@ -190,20 +190,20 @@ namespace dlib
case CR: case CR:
ch = '\r'; ch = '\r';
if (out.sputn(&ch,1)!=1) if (out.sputn(&ch,1)!=1)
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
break; break;
case LF: case LF:
ch = '\n'; ch = '\n';
if (out.sputn(&ch,1)!=1) if (out.sputn(&ch,1)!=1)
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
break; break;
case CRLF: case CRLF:
ch = '\r'; ch = '\r';
if (out.sputn(&ch,1)!=1) if (out.sputn(&ch,1)!=1)
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
ch = '\n'; ch = '\n';
if (out.sputn(&ch,1)!=1) if (out.sputn(&ch,1)!=1)
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
break; break;
default: default:
DLIB_CASSERT(false,"this should never happen"); DLIB_CASSERT(false,"this should never happen");
@ -235,7 +235,7 @@ namespace dlib
// write the encoded bytes to the output stream // write the encoded bytes to the output stream
if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4) if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4)
{ {
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
} }
// get 3 more input bytes // get 3 more input bytes
@ -265,7 +265,7 @@ namespace dlib
// write the encoded bytes to the output stream // write the encoded bytes to the output stream
if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4) if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4)
{ {
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
} }
@ -292,7 +292,7 @@ namespace dlib
// write the encoded bytes to the output stream // write the encoded bytes to the output stream
if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4) if (out.sputn(reinterpret_cast<char*>(&outbuf),4)!=4)
{ {
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
} }
break; break;
@ -370,7 +370,7 @@ namespace dlib
// write the encoded bytes to the output stream // write the encoded bytes to the output stream
if (out.sputn(reinterpret_cast<char*>(&outbuf),outsize)!=outsize) if (out.sputn(reinterpret_cast<char*>(&outbuf),outsize)!=outsize)
{ {
throw std::ios_base::failure("error occured in the base64 object"); throw std::ios_base::failure("error occurred in the base64 object");
} }
} }

View File

@ -121,7 +121,7 @@ namespace dlib
buffer <<= 8 - buffer_size; buffer <<= 8 - buffer_size;
if (osp->rdbuf()->sputn(reinterpret_cast<char*>(&buffer),1) == 0) if (osp->rdbuf()->sputn(reinterpret_cast<char*>(&buffer),1) == 0)
{ {
throw std::ios_base::failure("error occured in the bit_stream object"); throw std::ios_base::failure("error occurred in the bit_stream object");
} }
buffer_size = 0; buffer_size = 0;

View File

@ -127,7 +127,7 @@ namespace dlib
{ {
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
{ {
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
} }
buf = 0; buf = 0;
buf_used = 0; buf_used = 0;
@ -189,26 +189,26 @@ namespace dlib
} }
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low >> 24)&0xFF); buf = static_cast<unsigned char>((low >> 24)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low >> 16)&0xFF); buf = static_cast<unsigned char>((low >> 16)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low >> 8)&0xFF); buf = static_cast<unsigned char>((low >> 8)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
@ -216,7 +216,7 @@ namespace dlib
{ {
buf = static_cast<unsigned char>((low)&0xFF); buf = static_cast<unsigned char>((low)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
} }

View File

@ -170,7 +170,7 @@ namespace dlib
// write buf to the output stream // write buf to the output stream
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
{ {
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
} }
} }
@ -194,25 +194,25 @@ namespace dlib
buf = static_cast<unsigned char>((low >> 24)&0xFF); buf = static_cast<unsigned char>((low >> 24)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1) == 0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low >> 16)&0xFF); buf = static_cast<unsigned char>((low >> 16)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low >> 8)&0xFF); buf = static_cast<unsigned char>((low >> 8)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");
buf = static_cast<unsigned char>((low)&0xFF); buf = static_cast<unsigned char>((low)&0xFF);
if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0) if (streambuf->sputn(reinterpret_cast<char*>(&buf),1)==0)
throw std::ios_base::failure("error occured in the entropy_encoder object"); throw std::ios_base::failure("error occurred in the entropy_encoder object");