Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
fda8545b
Commit
fda8545b
authored
Mar 30, 2012
by
Davis King
Browse files
Minor change to avoid a warning from gcc.
parent
891dd2fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dlib/svm/svm_c_linear_trainer.h
dlib/svm/svm_c_linear_trainer.h
+4
-1
No files found.
dlib/svm/svm_c_linear_trainer.h
View file @
fda8545b
...
@@ -173,8 +173,11 @@ namespace dlib
...
@@ -173,8 +173,11 @@ namespace dlib
{
{
using
dlib
::
sparse_vector
::
dot
;
using
dlib
::
sparse_vector
::
dot
;
using
dlib
::
dot
;
using
dlib
::
dot
;
// The reason for using w_size_m1 and not just w.size()-1 is because
// doing it this way avoids an inane warning from gcc that can occur in some cases.
const
long
w_size_m1
=
w
.
size
()
-
1
;
for
(
long
i
=
0
;
i
<
samples
.
size
();
++
i
)
for
(
long
i
=
0
;
i
<
samples
.
size
();
++
i
)
dot_prods
[
i
]
=
dot
(
colm
(
w
,
0
,
w
.
size
()
-
1
),
samples
(
i
))
-
w
(
w
.
size
()
-
1
);
dot_prods
[
i
]
=
dot
(
colm
(
w
,
0
,
w
_
size
_m
1
),
samples
(
i
))
-
w
(
w
_
size
_m
1
);
if
(
is_first_call
)
if
(
is_first_call
)
{
{
...
...
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