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

Commit 1c10de5b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix clang-tidy warnings in mediaresourcemanager."

parents e0555198 5a3b6ca5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static String8 getString(const Vector<T> &items) {
    return itemsStr;
}

static bool hasResourceType(String8 type, Vector<MediaResource> resources) {
static bool hasResourceType(const String8& type, const Vector<MediaResource>& resources) {
    for (size_t i = 0; i < resources.size(); ++i) {
        if (resources[i].mType == type) {
            return true;
@@ -51,7 +51,7 @@ static bool hasResourceType(String8 type, Vector<MediaResource> resources) {
    return false;
}

static bool hasResourceType(String8 type, ResourceInfos infos) {
static bool hasResourceType(const String8& type, const ResourceInfos& infos) {
    for (size_t i = 0; i < infos.size(); ++i) {
        if (hasResourceType(type, infos[i].resources)) {
            return true;
@@ -75,7 +75,7 @@ static ResourceInfos& getResourceInfosForEdit(

static ResourceInfo& getResourceInfoForEdit(
        int64_t clientId,
        const sp<IResourceManagerClient> client,
        const sp<IResourceManagerClient>& client,
        ResourceInfos& infos) {
    for (size_t i = 0; i < infos.size(); ++i) {
        if (infos[i].clientId == clientId) {
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public:
    virtual status_t dump(int fd, const Vector<String16>& args);

    ResourceManagerService();
    ResourceManagerService(sp<ProcessInfoInterface> processInfo);
    explicit ResourceManagerService(sp<ProcessInfoInterface> processInfo);

    // IResourceManagerService interface
    virtual void config(const Vector<MediaResourcePolicy> &policies);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace android {
class ServiceLog : public RefBase {
public:
    ServiceLog();
    ServiceLog(size_t maxNum);
    explicit ServiceLog(size_t maxNum);

    void add(const String8 &log);
    String8 toString(const char *linePrefix = NULL) const;
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@

namespace android {

static int64_t getId(sp<IResourceManagerClient> client) {
static int64_t getId(const sp<IResourceManagerClient>& client) {
    return (int64_t) client.get();
}