Skip to content

Commit ac60aa4

Browse files
Copilotwysaid
andcommitted
Initial plan for optimizing CcapDeviceInfo structure
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
1 parent 9074792 commit ac60aa4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/desktop/utils/helper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <ccap.h>
66
#include <cstdio>
77
#include <cstdlib>
8+
#include <cstring>
89
#include <filesystem>
910
#include <string>
1011
#include <vector>
@@ -27,7 +28,7 @@ int getCurrentWorkingDirectory(char* buffer, int size) {
2728
if (cwd.size() >= size) {
2829
return -1; // Buffer too small
2930
}
30-
std::strcpy(buffer, cwd.c_str());
31+
strcpy(buffer, cwd.c_str());
3132
return 0;
3233
} catch (const std::exception& e) {
3334
fprintf(stderr, "Failed to get current working directory: %s\n", e.what());

0 commit comments

Comments
 (0)