Fix media_cas_proxy_sdk build issue.
Add example binary for testing building the SDK after 'git clone' from our repo. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227583629
This commit is contained in:
@@ -11,24 +11,26 @@
|
||||
|
||||
#include "google/protobuf/descriptor.h"
|
||||
#include "google/protobuf/generated_enum_reflection.h"
|
||||
#include "util/status.h"
|
||||
#include "util/error_space.h"
|
||||
|
||||
namespace widevine {
|
||||
namespace util {
|
||||
|
||||
template <typename T>
|
||||
class ProtoEnumErrorSpace : public ErrorSpaceImpl<ProtoEnumErrorSpace<T>> {
|
||||
class ProtoEnumErrorSpace
|
||||
: public util::ErrorSpaceImpl<ProtoEnumErrorSpace<T>> {
|
||||
public:
|
||||
static std::string SpaceName() {
|
||||
static std::string space_name() {
|
||||
return google::protobuf::GetEnumDescriptor<T>()->full_name();
|
||||
}
|
||||
|
||||
static std::string CodeToString(int code) {
|
||||
static std::string code_to_string(int code) {
|
||||
const google::protobuf::EnumValueDescriptor* v =
|
||||
google::protobuf::GetEnumDescriptor<T>()->FindValueByNumber(code);
|
||||
if (v) return v->name();
|
||||
return std::to_string(code);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace util
|
||||
|
||||
Reference in New Issue
Block a user