Merge "Use std::unique_ptr instead of UniquePtr."
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#include "idmap.h"
|
#include "idmap.h"
|
||||||
|
|
||||||
#include <UniquePtr.h>
|
#include <memory>
|
||||||
#include <androidfw/AssetManager.h>
|
#include <androidfw/AssetManager.h>
|
||||||
#include <androidfw/ResourceTypes.h>
|
#include <androidfw/ResourceTypes.h>
|
||||||
#include <androidfw/ZipFileRO.h>
|
#include <androidfw/ZipFileRO.h>
|
||||||
@@ -15,7 +15,7 @@ using namespace android;
|
|||||||
namespace {
|
namespace {
|
||||||
int get_zip_entry_crc(const char *zip_path, const char *entry_name, uint32_t *crc)
|
int get_zip_entry_crc(const char *zip_path, const char *entry_name, uint32_t *crc)
|
||||||
{
|
{
|
||||||
UniquePtr<ZipFileRO> zip(ZipFileRO::open(zip_path));
|
std::unique_ptr<ZipFileRO> zip(ZipFileRO::open(zip_path));
|
||||||
if (zip.get() == NULL) {
|
if (zip.get() == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "idmap.h"
|
#include "idmap.h"
|
||||||
|
|
||||||
#include <UniquePtr.h>
|
#include <memory>
|
||||||
#include <androidfw/ResourceTypes.h>
|
#include <androidfw/ResourceTypes.h>
|
||||||
#include <androidfw/StreamingZipInflater.h>
|
#include <androidfw/StreamingZipInflater.h>
|
||||||
#include <androidfw/ZipFileRO.h>
|
#include <androidfw/ZipFileRO.h>
|
||||||
@@ -120,7 +120,7 @@ namespace {
|
|||||||
|
|
||||||
int parse_apk(const char *path, const char *target_package_name)
|
int parse_apk(const char *path, const char *target_package_name)
|
||||||
{
|
{
|
||||||
UniquePtr<ZipFileRO> zip(ZipFileRO::open(path));
|
std::unique_ptr<ZipFileRO> zip(ZipFileRO::open(path));
|
||||||
if (zip.get() == NULL) {
|
if (zip.get() == NULL) {
|
||||||
ALOGW("%s: failed to open zip %s\n", __FUNCTION__, path);
|
ALOGW("%s: failed to open zip %s\n", __FUNCTION__, path);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user