Add type-safe wrapper around NT_Value and NT_String.

Change-Id: Ib7ef5a6de9c8c7a1f5f6432083d1fb38328438dc
This commit is contained in:
Peter Johnson
2015-06-28 21:52:06 -07:00
parent 8d6a0786c8
commit f6deafee22
5 changed files with 311 additions and 53 deletions

View File

@@ -12,9 +12,9 @@
#include "ntcore.h"
bool operator==(const NT_Value& lhs, const NT_Value& rhs) {
if (lhs.type != rhs.type) return false;
switch (lhs.type) {
bool ntimpl::operator==(const Value& lhs, const Value& rhs) {
if (lhs.type() != rhs.type()) return false;
switch (lhs.type()) {
case NT_UNASSIGNED:
return true; // XXX: is this better being false instead?
case NT_BOOLEAN: