Commit 372c3a94 authored by Francis Dupont's avatar Francis Dupont

[master] Cast mismatched enums

parent 749fd318
// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -14,12 +14,18 @@
using namespace isc::dhcp;
OptionVendor::OptionVendor(Option::Universe u, const uint32_t vendor_id)
:Option(u, u==Option::V4?DHO_VIVSO_SUBOPTIONS:D6O_VENDOR_OPTS), vendor_id_(vendor_id) {
: Option(u, u == Option::V4 ?
static_cast<uint16_t>(DHO_VIVSO_SUBOPTIONS) :
static_cast<uint16_t>(D6O_VENDOR_OPTS)),
vendor_id_(vendor_id) {
}
OptionVendor::OptionVendor(Option::Universe u, OptionBufferConstIter begin,
OptionBufferConstIter end)
:Option(u, u==Option::V4?DHO_VIVSO_SUBOPTIONS:D6O_VENDOR_OPTS), vendor_id_(0) {
: Option(u, u == Option::V4?
static_cast<uint16_t>(DHO_VIVSO_SUBOPTIONS) :
static_cast<uint16_t>(D6O_VENDOR_OPTS)),
vendor_id_(0) {
unpack(begin, end);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment