security+util: mark all pimpl unique_ptrs const
Change-Id: I3966c4988dceb49c204e23967ba90729877bddf1
diff --git a/tests/unit-tests/security/tpm/back-end-wrapper-file.hpp b/tests/unit-tests/security/tpm/back-end-wrapper-file.hpp
index 3e403ce..64f5a0a 100644
--- a/tests/unit-tests/security/tpm/back-end-wrapper-file.hpp
+++ b/tests/unit-tests/security/tpm/back-end-wrapper-file.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -38,7 +38,7 @@
public:
BackEndWrapperFile()
: m_tmpPath(boost::filesystem::path(UNIT_TEST_CONFIG_PATH) / "TpmFileTest")
- , m_impl(new BackEndFile(m_tmpPath.string()))
+ , m_impl(make_unique<BackEndFile>(m_tmpPath.string()))
{
}
@@ -60,8 +60,8 @@
}
private:
- boost::filesystem::path m_tmpPath;
- unique_ptr<BackEnd> m_impl;
+ const boost::filesystem::path m_tmpPath;
+ const unique_ptr<BackEnd> m_impl;
};
} // namespace tests
diff --git a/tests/unit-tests/security/tpm/back-end-wrapper-mem.hpp b/tests/unit-tests/security/tpm/back-end-wrapper-mem.hpp
index ea10295..692ba65 100644
--- a/tests/unit-tests/security/tpm/back-end-wrapper-mem.hpp
+++ b/tests/unit-tests/security/tpm/back-end-wrapper-mem.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -36,8 +36,8 @@
{
public:
BackEndWrapperMem()
+ : m_impl(make_unique<BackEndMem>())
{
- m_impl = unique_ptr<BackEnd>(new BackEndMem);
}
BackEnd&
@@ -53,7 +53,7 @@
}
private:
- unique_ptr<BackEnd> m_impl;
+ const unique_ptr<BackEnd> m_impl;
};
} // namespace tests