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

Commit a345af9b authored by Muhammad Qureshi's avatar Muhammad Qureshi
Browse files

Run clang-format in stats_log_api_gen

Bug: 152253223
Test: m stats-log-api-gen
Test: stats-log-api-gen-test
Change-Id: Iad76baea8cc9ae7b3978f1133ab94d8e96bbbafe
parent 9b995809
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
BasedOnStyle: Google
AllowShortIfStatementsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortLoopsOnASingleLine: true
BinPackArguments: true
BinPackParameters: true
ColumnLimit: 100
CommentPragmas: NOLINT:.*
ContinuationIndentWidth: 8
DerivePointerAlignment: false
IndentWidth: 4
PointerAlignment: Left
TabWidth: 4
AccessModifierOffset: -4
IncludeCategories:
  - Regex:    '^"Log\.h"'
    Priority:    -1
+352 −380

File changed.

Preview size limit exceeded, changes collapsed.

+42 −35
Original line number Diff line number Diff line
@@ -17,24 +17,24 @@
#ifndef ANDROID_STATS_LOG_API_GEN_COLLATION_H
#define ANDROID_STATS_LOG_API_GEN_COLLATION_H


#include <google/protobuf/descriptor.h>
#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"

#include <map>
#include <set>
#include <vector>
#include <map>

#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"

namespace android {
namespace stats_log_api_gen {

using google::protobuf::Descriptor;
using google::protobuf::FieldDescriptor;
using std::map;
using std::set;
using std::shared_ptr;
using std::string;
using std::vector;
using google::protobuf::Descriptor;
using google::protobuf::FieldDescriptor;

const int PULL_ATOM_START_ID = 10000;

@@ -86,8 +86,10 @@ union AnnotationValue {
    int intValue;
    bool boolValue;

    AnnotationValue(const int value): intValue(value) {}
    AnnotationValue(const bool value): boolValue(value) {}
    AnnotationValue(const int value) : intValue(value) {
    }
    AnnotationValue(const bool value) : boolValue(value) {
    }
};

struct Annotation {
@@ -97,9 +99,11 @@ struct Annotation {
    AnnotationValue value;

    inline Annotation(unsigned char annotationId, int atomId, AnnotationType type,
            AnnotationValue value):
            annotationId(annotationId), atomId(atomId), type(type), value(value) {}
    inline ~Annotation() {}
                      AnnotationValue value)
        : annotationId(annotationId), atomId(atomId), type(type), value(value) {
    }
    inline ~Annotation() {
    }

    inline bool operator<(const Annotation& that) const {
        return atomId == that.atomId ? annotationId < that.annotationId : atomId < that.atomId;
@@ -115,16 +119,20 @@ struct AtomField {
    string name;
    java_type_t javaType;

    // If the field is of type enum, the following map contains the list of enum values.
    // If the field is of type enum, the following map contains the list of enum
    // values.
    map<int /* numeric value */, string /* value name */> enumValues;

    inline AtomField() :name(), javaType(JAVA_TYPE_UNKNOWN) {}
    inline AtomField(const AtomField& that) :name(that.name),
                                             javaType(that.javaType),
                                             enumValues(that.enumValues) {}
    inline AtomField() : name(), javaType(JAVA_TYPE_UNKNOWN) {
    }
    inline AtomField(const AtomField& that)
        : name(that.name), javaType(that.javaType), enumValues(that.enumValues) {
    }

    inline AtomField(string n, java_type_t jt) :name(n), javaType(jt) {}
    inline ~AtomField() {}
    inline AtomField(string n, java_type_t jt) : name(n), javaType(jt) {
    }
    inline ~AtomField() {
    }
};

/**
@@ -178,5 +186,4 @@ int collate_atom(const Descriptor *atom, AtomDecl *atomDecl, vector<java_type_t>
}  // namespace stats_log_api_gen
}  // namespace android


#endif  // ANDROID_STATS_LOG_API_GEN_COLLATION_H
+29 −35

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@

#pragma once

#include "Collation.h"

#include <stdio.h>
#include <string.h>

#include "Collation.h"

namespace android {
namespace stats_log_api_gen {

Loading