Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5a837a4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add implicit conversion operator to std::string_view" am: 17981e0a am: 6ad1ca6c

parents 1d3a3b7b 6ad1ca6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -985,7 +985,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() {

    int type = storage->getType();
    if (type == MTP_STORAGE_REMOVABLE_RAM) {
        std::string str = android::base::Trim((const char*)name);
        std::string str = android::base::Trim(name);
        name.set(str.c_str());
    }
    ALOGV("name: %s format: 0x%04X (%s)\n", (const char*)name, format,
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <log/log.h>
#include <stdint.h>
#include <string>
#include <string_view>

// Max Character number of a MTP String
#define MTP_STRING_MAX_CHARACTER_NUMBER             255
@@ -55,6 +56,7 @@ public:
    inline int      size() const { return mString.length(); }

    inline operator const char*() const { return mString.c_str(); }
    operator std::string_view() const { return mString; }
};

inline void MtpStringBuffer::append(const char* other) {