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

Commit c2ef581d authored by Koushik Dutta's avatar Koushik Dutta
Browse files

Fixes for clang:

PackageInfo is a class, not a struct.
String16 is contained in the android namespace. Do not namespace prefix it
within the android namespace.
Explicitly specify which std classes are necessary to prevent ambiguous
type errors. (map, set)

Change-Id: I0d01477a976e770821ebae8847f8d11b132a15d6
parent 34b32f41
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@
#include <utils/Log.h>
#include <utils/Log.h>
#include "ResourceIdCache.h"
#include "ResourceIdCache.h"
#include <map>
#include <map>
using namespace std;
using std::map;




static size_t mHits = 0;
static size_t mHits = 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
#define RESOURCE_ID_CACHE_H
#define RESOURCE_ID_CACHE_H


namespace android {
namespace android {
class android::String16;
class String16;


class ResourceIdCache {
class ResourceIdCache {
public:
public:
+2 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,8 @@
#include <set>
#include <set>
#include <map>
#include <map>


using namespace std;
using std::map;
using std::set;


class XMLNode;
class XMLNode;
class ResourceTable;
class ResourceTable;
+2 −2
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ void usage(void)
        "   Prints the OBB signature information of a file.\n\n", gProgName);
        "   Prints the OBB signature information of a file.\n\n", gProgName);
}
}


void doAdd(const char* filename, struct PackageInfo* info) {
void doAdd(const char* filename, PackageInfo* info) {
    ObbFile *obb = new ObbFile();
    ObbFile *obb = new ObbFile();
    if (obb->readFrom(filename)) {
    if (obb->readFrom(filename)) {
        fprintf(stderr, "ERROR: %s: OBB signature already present\n", filename);
        fprintf(stderr, "ERROR: %s: OBB signature already present\n", filename);
@@ -182,7 +182,7 @@ int main(int argc, char* const argv[])
{
{
    int opt;
    int opt;
    int option_index = 0;
    int option_index = 0;
    struct PackageInfo package_info;
    PackageInfo package_info;


    int result = 1;    // pessimistically assume an error.
    int result = 1;    // pessimistically assume an error.