Coder Social home page Coder Social logo

Comments (2)

tau0 avatar tau0 commented on August 17, 2024

Joaquín, thanks for the report!

I confirm it's an issue and I can take a look into it. Unless of course you would like to submit a PR yourself?

from logdevice.

joaquintides avatar joaquintides commented on August 17, 2024

I'm afraid I don't have the time to replicate a local environment in which to do the change. From a visual inspection, seems like the only changes need are:

In AllServerReadStreams.h, from:

boost::multi_index::multi_index_container<
  std::shared_ptr<ServerReadStream>,

to:

boost::multi_index::multi_index_container<
  ServerReadStream,

and from:

template <typename I>
static constexpr ServerReadStream& deref(I& it) {
  return const_cast<ServerReadStream&>(**it);
}

to:

template <typename I>
static constexpr ServerReadStream& deref(I& it) {
  return const_cast<ServerReadStream&>(*it);
}

In AllServerReadStreams.cpp, from:

auto stream = std::make_shared<ServerReadStream>(
    read_stream_id, client_id, log_id, shard, stats_, log_group_path);

const auto insert_result = streams_.insert(std::move(stream));

to:

const auto insert_result = streams_.emplace(
    read_stream_id, client_id, log_id, shard, stats_, log_group_path);

and from:

 (*it)->...

to:

it->...

If there are additional adjustments to be made the compiler will surely indicate it with an error.

from logdevice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.