Update Lix to latest revision #8
Loading…
Reference in a new issue
No description provided.
Delete branch "ma27/hydra:lix-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
cc @delroth @leo60228
cc @jade who authored the related Lix change. Would be nice if you could double-check if I didn't mess anything up in
e92ac734e6
:)i mean there's really nothing wrong with this code but there's a couple things you could make a bit better
@ -12,0 +18,4 @@
public:
MyFileHandle(NarMemberData * memberData, uint64_t size) : memberData(memberData)
{
expectedSize = size;
should be in the initializer above rather than in the function itself
@ -12,0 +19,4 @@
MyFileHandle(NarMemberData * memberData, uint64_t size) : memberData(memberData)
{
expectedSize = size;
hashSink = std::make_unique<HashSink>(HashType::SHA256);
does this actually have to be behind a pointer? only reason i can see that it would is being big but i don't think it's big.
edit: oh, it might be the reset() maybe? so that it becomes null and crashes if you put extra data in it?
@ -32,2 +60,3 @@
std::unique_ptr<FileHandle> createRegularFile(const Path & path, uint64_t size, bool executable) override
{
curMember = &members.insert_or_assign(prefix + path, NarMemberData {
auto memberData = &members.insert_or_assign(prefix + path, NarMemberData {
probably should be
auto *
right?or you could refactor it into being a reference now that the field doesn't need to be reassigned; either way.
To be clear, that's also helpful for me!
I mostly do C++ because I'm interested in hacking on Lix & Hydra, so getting input on how to do things better is very valuable to me. Thank you!
I'll try to get back to you this weekend for that.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.