fix: use std::string instead of plain C string to get rid of waring about strlen()

pull/10/head
Falk Werner 6 years ago
parent 95a0a4df59
commit 0279f1f7bd

@ -1,15 +1,14 @@
#include <cstring> #include <string>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "wsfs/jsonrpc/response.h" #include "wsfs/jsonrpc/response.h"
static void wsfs_response_parse_str( static void wsfs_response_parse_str(
char const * buffer, std::string const & buffer,
struct wsfs_jsonrpc_response * response) struct wsfs_jsonrpc_response * response)
{ {
size_t length = strlen(buffer); wsfs_jsonrpc_response_init(response, buffer.c_str(), buffer.size());
wsfs_jsonrpc_response_init(response, buffer, length);
} }
TEST(response_parser, test) TEST(response_parser, test)

Loading…
Cancel
Save