Cleaned up Status class.
Change-Id: I1ff470410b38d32ad828618f756487585660a272
This commit is contained in:
parent
8a0458c17b
commit
c0df6b3239
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "packager/media/base/status.h"
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
#include "packager/base/strings/stringprintf.h"
|
||||
|
||||
namespace edash_packager {
|
||||
|
@ -53,8 +54,8 @@ std::string ErrorCodeToString(Code error_code) {
|
|||
} // namespace
|
||||
} // namespace error
|
||||
|
||||
const Status& Status::OK = Status(error::OK, "");
|
||||
const Status& Status::UNKNOWN = Status(error::UNKNOWN, "");
|
||||
const Status Status::OK = Status(error::OK, "");
|
||||
const Status Status::UNKNOWN = Status(error::UNKNOWN, "");
|
||||
|
||||
std::string Status::ToString() const {
|
||||
if (error_code_ == error::OK)
|
||||
|
|
|
@ -7,10 +7,9 @@
|
|||
#ifndef MEDIA_BASE_STATUS_H_
|
||||
#define MEDIA_BASE_STATUS_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
|
||||
namespace edash_packager {
|
||||
namespace media {
|
||||
|
||||
|
@ -91,8 +90,8 @@ class Status {
|
|||
|
||||
/// @name Some pre-defined Status objects.
|
||||
/// @{
|
||||
static const Status& OK; // Identical to 0-arg constructor.
|
||||
static const Status& UNKNOWN;
|
||||
static const Status OK; // Identical to 0-arg constructor.
|
||||
static const Status UNKNOWN;
|
||||
/// @}
|
||||
|
||||
/// Store the specified error in this Status object.
|
||||
|
@ -158,7 +157,7 @@ class Status {
|
|||
// generated copy constructor and assignment operator.
|
||||
};
|
||||
|
||||
extern std::ostream& operator<<(std::ostream& os, const Status& x);
|
||||
std::ostream& operator<<(std::ostream& os, const Status& x);
|
||||
|
||||
} // namespace media
|
||||
} // namespace edash_packager
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
#include "packager/base/memory/ref_counted.h"
|
||||
#include "packager/base/memory/scoped_ptr.h"
|
||||
#include "packager/media/base/status.h"
|
||||
|
|
Loading…
Reference in New Issue