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
tianlh
LightGBM-DCU
Commits
38b65e5f
Commit
38b65e5f
authored
Nov 29, 2017
by
Guolin Ke
Browse files
fix a warning
parent
f42e6c36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/lightgbm_R.cpp
src/lightgbm_R.cpp
+1
-1
No files found.
src/lightgbm_R.cpp
View file @
38b65e5f
...
@@ -38,7 +38,7 @@ LGBM_SE EncodeChar(LGBM_SE dest, const char* src, LGBM_SE buf_len, LGBM_SE actua
...
@@ -38,7 +38,7 @@ LGBM_SE EncodeChar(LGBM_SE dest, const char* src, LGBM_SE buf_len, LGBM_SE actua
Log
::
Fatal
(
"Don't support large string in R-package."
);
Log
::
Fatal
(
"Don't support large string in R-package."
);
}
}
R_INT_PTR
(
actual_len
)[
0
]
=
static_cast
<
int
>
(
str_len
);
R_INT_PTR
(
actual_len
)[
0
]
=
static_cast
<
int
>
(
str_len
);
if
(
R_AS_INT
(
buf_len
)
<
str_len
)
{
return
dest
;
}
if
(
R_AS_INT
(
buf_len
)
<
static_cast
<
int
>
(
str_len
)
)
{
return
dest
;
}
auto
ptr
=
R_CHAR_PTR
(
dest
);
auto
ptr
=
R_CHAR_PTR
(
dest
);
std
::
memcpy
(
ptr
,
src
,
str_len
);
std
::
memcpy
(
ptr
,
src
,
str_len
);
return
dest
;
return
dest
;
...
...
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