Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
f6ea3397
Commit
f6ea3397
authored
Feb 15, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed spelling errors.
parent
87aa290c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
base64_kernel_1.cpp
dlib/base64/base64_kernel_1.cpp
+8
-8
bit_stream_kernel_1.cpp
dlib/bit_stream/bit_stream_kernel_1.cpp
+1
-1
entropy_encoder_kernel_1.cpp
dlib/entropy_encoder/entropy_encoder_kernel_1.cpp
+6
-6
entropy_encoder_kernel_2.cpp
dlib/entropy_encoder/entropy_encoder_kernel_2.cpp
+5
-5
No files found.
dlib/base64/base64_kernel_1.cpp
View file @
f6ea3397
...
...
@@ -190,20 +190,20 @@ namespace dlib
case
CR
:
ch
=
'\r'
;
if
(
out
.
sputn
(
&
ch
,
1
)
!=
1
)
throw
std
::
ios_base
::
failure
(
"error occured in the base64 object"
);
throw
std
::
ios_base
::
failure
(
"error occur
r
ed in the base64 object"
);
break
;
case
LF
:
ch
=
'\n'
;
if
(
out
.
sputn
(
&
ch
,
1
)
!=
1
)
throw
std
::
ios_base
::
failure
(
"error occured in the base64 object"
);
throw
std
::
ios_base
::
failure
(
"error occur
r
ed in the base64 object"
);
break
;
case
CRLF
:
ch
=
'\r'
;
if
(
out
.
sputn
(
&
ch
,
1
)
!=
1
)
throw
std
::
ios_base
::
failure
(
"error occured in the base64 object"
);
throw
std
::
ios_base
::
failure
(
"error occur
r
ed in the base64 object"
);
ch
=
'\n'
;
if
(
out
.
sputn
(
&
ch
,
1
)
!=
1
)
throw
std
::
ios_base
::
failure
(
"error occured in the base64 object"
);
throw
std
::
ios_base
::
failure
(
"error occur
r
ed in the base64 object"
);
break
;
default
:
DLIB_CASSERT
(
false
,
"this should never happen"
);
...
...
@@ -235,7 +235,7 @@ namespace dlib
// write the encoded bytes to the output stream
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 occur
r
ed in the base64 object"
);
}
// get 3 more input bytes
...
...
@@ -265,7 +265,7 @@ namespace dlib
// write the encoded bytes to the output stream
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 occur
r
ed in the base64 object"
);
}
...
...
@@ -292,7 +292,7 @@ namespace dlib
// write the encoded bytes to the output stream
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 occur
r
ed in the base64 object"
);
}
break
;
...
...
@@ -370,7 +370,7 @@ namespace dlib
// write the encoded bytes to the output stream
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 occur
r
ed in the base64 object"
);
}
}
...
...
dlib/bit_stream/bit_stream_kernel_1.cpp
View file @
f6ea3397
...
...
@@ -121,7 +121,7 @@ namespace dlib
buffer
<<=
8
-
buffer_size
;
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 occur
r
ed in the bit_stream object"
);
}
buffer_size
=
0
;
...
...
dlib/entropy_encoder/entropy_encoder_kernel_1.cpp
View file @
f6ea3397
...
...
@@ -127,7 +127,7 @@ namespace dlib
{
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 occur
r
ed in the entropy_encoder object"
);
}
buf
=
0
;
buf_used
=
0
;
...
...
@@ -189,26 +189,26 @@ namespace dlib
}
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
>>
24
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
>>
16
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
>>
8
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
...
...
@@ -216,7 +216,7 @@ namespace dlib
{
buf
=
static_cast
<
unsigned
char
>
((
low
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
}
...
...
dlib/entropy_encoder/entropy_encoder_kernel_2.cpp
View file @
f6ea3397
...
...
@@ -170,7 +170,7 @@ namespace dlib
// write buf to the output stream
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 occur
r
ed in the entropy_encoder object"
);
}
}
...
...
@@ -194,25 +194,25 @@ namespace dlib
buf
=
static_cast
<
unsigned
char
>
((
low
>>
24
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
>>
16
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
>>
8
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
buf
=
static_cast
<
unsigned
char
>
((
low
)
&
0xFF
);
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 occur
r
ed in the entropy_encoder object"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment