Merge "Address const issues in preparation for libcxx rebase."
This commit is contained in:
commit
b2cb35ef96
3 changed files with 4 additions and 4 deletions
|
|
@ -118,7 +118,7 @@ void connect_to_smartsocket(asocket *s);
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
#if ADB_HOST
|
#if ADB_HOST
|
||||||
char* skip_host_serial(const char* service);
|
char* skip_host_serial(char* service);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,8 @@ TEST_F(LocalSocketTest, close_socket_in_CLOSE_WAIT_state) {
|
||||||
|
|
||||||
// Checks that skip_host_serial(serial) returns a pointer to the part of |serial| which matches
|
// Checks that skip_host_serial(serial) returns a pointer to the part of |serial| which matches
|
||||||
// |expected|, otherwise logs the failure to gtest.
|
// |expected|, otherwise logs the failure to gtest.
|
||||||
void VerifySkipHostSerial(const std::string& serial, const char* expected) {
|
void VerifySkipHostSerial(std::string serial, const char* expected) {
|
||||||
const char* result = internal::skip_host_serial(serial.c_str());
|
char* result = internal::skip_host_serial(&serial[0]);
|
||||||
if (expected == nullptr) {
|
if (expected == nullptr) {
|
||||||
EXPECT_EQ(nullptr, result);
|
EXPECT_EQ(nullptr, result);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -634,7 +634,7 @@ namespace internal {
|
||||||
// Where <port> must be a base-10 number and <prefix> may be any of {usb,product,model,device}.
|
// Where <port> must be a base-10 number and <prefix> may be any of {usb,product,model,device}.
|
||||||
//
|
//
|
||||||
// The returned pointer will point to the ':' just before <command>, or nullptr if not found.
|
// The returned pointer will point to the ':' just before <command>, or nullptr if not found.
|
||||||
char* skip_host_serial(const char* service) {
|
char* skip_host_serial(char* service) {
|
||||||
static const std::vector<std::string>& prefixes =
|
static const std::vector<std::string>& prefixes =
|
||||||
*(new std::vector<std::string>{"usb:", "product:", "model:", "device:"});
|
*(new std::vector<std::string>{"usb:", "product:", "model:", "device:"});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue