blob: 396974dd56c3ae577f393e10574b01b736f60fbc [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lib/fidl/cpp/clone.h"
namespace fidl {
zx_status_t Clone(const StringPtr& value, StringPtr* result) {
if (!value) {
*result = StringPtr();
} else {
*result = value.value();
}
return ZX_OK;
}
zx_status_t Clone(const ::std::string& value, std::string* result) {
*result = value;
return ZX_OK;
}
} // namespace fidl