status_t Preferences::SetFlat (const char *name, const BFlattenable *obj) { if (HasFlat (name, obj) == true) return ReplaceFlat (name, 0, (BFlattenable*)obj); return AddFlat (name, (BFlattenable*) obj); }
status_t AttributeMessage::SetAttribute(const char* name, const BFlattenable* value) { if (ReplaceFlat(name, const_cast<BFlattenable*>(value)) == B_OK) return B_OK; return AddFlat(name, const_cast<BFlattenable*>(value)); }