Small improvements. nullptr -> nullptr_t for isNullPtrType

This commit is contained in:
Boris Perovic 2015-08-18 18:02:07 +02:00 committed by sftnight
parent 800c644352
commit fc447d5fd5
2 changed files with 4 additions and 7 deletions

View File

@ -13,6 +13,8 @@
namespace cling {
class Value;
// void pointer
std::string printValue(void *ptr);
@ -58,7 +60,6 @@ namespace cling {
// std::string
std::string printValue(const std::string &val);
class Value;
// cling::Value
std::string printValue(const Value &value);

View File

@ -348,7 +348,7 @@ static std::string printUnpackedClingValue(const Value& V) {
if(Ty-> isNullPtrType()) {
// special case nullptr_t
strm << "nullptr";
strm << "nullptr_t";
} else if (Ty->isEnumeralType()) {
// special case enum printing, using compiled information
strm << printEnumValue(V);
@ -382,11 +382,7 @@ namespace cling {
// Bool
std::string printValue(bool val) {
if (val) {
return "true";
} else {
return "false";
}
return val ? "true" : "false";
}
// Chars