krychu / wfc

Wave Function Collapse library in C, plus a command-line tool
343 stars 20 forks source link

Incorrect Comment #10

Closed nsmryan closed 2 years ago

nsmryan commented 2 years ago

It looks like the comment about wfc_destroy: https://github.com/krychu/wfc/blob/8367df511191a30ad5aebcac132dd88c6d33306e/wfc.h#L149

is incorrect given: https://github.com/krychu/wfc/blob/8367df511191a30ad5aebcac132dd88c6d33306e/wfc.h#L1143

I don't know why this line was commented out, so I won't suggest a solution either way, but it seems like the comment or the code should be changed.

Btw, thank you for this library! I have been looking for a simple, C implementation of WFC!

krychu commented 2 years ago

Good catch, thanks! I think the comment and code should be removed. wfc_destroy shouldn't destroy image that it didn't create and which is passed to it.

krychu commented 2 years ago

Btw, thank you for this library! I have been looking for a simple, C implementation of WFC!

You're welcome, and thanks for using!

krychu commented 2 years ago

Fixed in: https://github.com/krychu/wfc/commit/6e37e4d6ac1bd9d83109312fdfa5255383ada1ab