[network-data] use enumeration Type for local vs leader (#3455)

This commit changes `NetworkData` to use an enumeration `Type` to
specify whether a `NetworkData` instance represents local network
data or leader network data.
This commit is contained in:
Abtin Keshavarzian
2019-01-14 13:51:50 -08:00
committed by Jonathan Hui
parent 2057a141ef
commit 59385b188b
5 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ class TestNetworkData : public NetworkData::NetworkData
{
public:
TestNetworkData(ot::Instance *aInstance, const uint8_t *aTlvs, uint8_t aTlvsLength)
: NetworkData::NetworkData(*aInstance, false)
: NetworkData::NetworkData(*aInstance, kTypeLeader)
{
memcpy(mTlvs, aTlvs, aTlvsLength);
mLength = aTlvsLength;