Permalink
Browse files

Make HandleStorage private

  • Loading branch information...
mlang committed Jul 22, 2017
1 parent ee25ae2 commit 280822e5872e09af5b50830eeebf141cd6e0d018
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/brlapi.cpp
View
@@ -2,17 +2,16 @@
#include <brlapi.h>
struct BrlAPI::Connection::Implementation {
class BrlAPI::Connection::Implementation {
std::unique_ptr<gsl::byte[]> HandleStorage;
public:
Implementation() : HandleStorage(new gsl::byte[brlapi_getHandleSize()]) {}
brlapi_handle_t *handle() const {
return static_cast<brlapi_handle_t *>(static_cast<void *>(HandleStorage.get()));
return reinterpret_cast<brlapi_handle_t *>(HandleStorage.get());
}
Implementation() : HandleStorage(new gsl::byte[brlapi_getHandleSize()]) {}
};
BrlAPI::Connection::Connection()
: BrlAPI(std::make_unique<Implementation>())
{
BrlAPI::Connection::Connection() : BrlAPI(std::make_unique<Implementation>()) {
brlapi_connectionSettings_t Settings = BRLAPI_SETTINGS_INITIALIZER;
auto FileDescriptor = brlapi__openConnection(BrlAPI->handle(), &Settings, &Settings);
if (FileDescriptor == -1) {

0 comments on commit 280822e

Please sign in to comment.