diff options
| author | 2011-10-23 14:59:04 -0700 | |
|---|---|---|
| committer | 2011-10-25 00:03:03 -0700 | |
| commit | 6b4ef025af12b158d117fc80fc79acf620f411a0 (patch) | |
| tree | 223c580477cbb7bde240b599da4bbee793b8dcaf /src/utils.cc | |
| parent | 21b9f1355f0311b5c67bfdfa9dd63cacb1fba502 (diff) | |
Make ResolveField not rely on Field::GetType resolution
Change-Id: I10f4a874809ac9db2cd54e200cf10eb7c8979fce
Diffstat (limited to 'src/utils.cc')
| -rw-r--r-- | src/utils.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils.cc b/src/utils.cc index 3922033dd7..a74e2310a7 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -110,13 +110,19 @@ std::string PrettyDescriptor(const std::string& descriptor) { return result; } +std::string PrettyDescriptor(Primitive::Type type) { + char descriptor_char = Primitive::DescriptorChar(type); + std::string descriptor_string(1, descriptor_char); + return PrettyDescriptor(descriptor_string); +} + std::string PrettyField(const Field* f, bool with_type) { if (f == NULL) { return "null"; } std::string result; if (with_type) { - result += PrettyDescriptor(f->GetType()->GetDescriptor()); + result += PrettyDescriptor(f->GetTypeDescriptor()); result += ' '; } result += PrettyDescriptor(f->GetDeclaringClass()->GetDescriptor()); |