FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
OpenSplat/utils.cpp at OpenSplatLibrary · NewChromantics/OpenSplat · GitHub
NewChromantics
/
OpenSplat
Public
forked from
WebODM/OpenSplat
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
OpenSplat
/
utils.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (13 loc) · 409 Bytes
Breadcrumbs
OpenSplat
/
utils.cpp
Copy path
File metadata and controls
15 lines (13 loc) · 409 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
include
"
utils.hpp
"
void
CopyStringToBuffer
(std::string_view input,
char
*dst,
size_t
dst_size)
{
//
gr: throw?
if
( !dst )
return
;
auto
CopyLength =
std::min
( dst_size, input.
length
() );
for
(
auto
i=
0
; i<CopyLength; i++ )
dst[i] = input[i];
//
input.length has no terminator, thus [length]=0 in output
auto
TerminatorPos =
std::min
( dst_size-
1
, input.
length
() );
dst[TerminatorPos] =
'
\0
'
;
}
Back
|
FazBrowse Home
|
New Git URL