Ad
  • Custom User Avatar

    Have to change the prototype in C++!!
    Common best practice is to always work with contiguous structures as arrays or vectors when dealing with INDEXES or VERTICES in graphics.

    You are using #include<vector> and.. returning a pointer to an array ?? REALLY ??

  • Custom User Avatar

    I really like the task, but the implementation ignores a lot of C++ authoring guidelines (and iiuc, pretty much on purpose), that's why I afraid it is quite unlikely it ever gets approved, and that is a shame.

    I would suggest re-making this kata with the guideline in mind.

    If you have any problems with that, feel free to ask in #help-author about anything you like.

    Cheers!

  • Custom User Avatar

    No random tests?

  • Custom User Avatar

    C++ should use std::string and not C-strings: https://docs.codewars.com/languages/cpp/authoring/

  • Custom User Avatar
  • Custom User Avatar

    0 < i < inf

    Should be 0 <= i. Also < inf is undesirable here: language lawyers will argue with you how integers aren't arbitrarily sized. It should be removed.

    you will return an empty array (nullptr)

    nullptr is not an empty array; the latter would be a zero-sized object which has different behaviour from a reference to nullptr, and in almost all other languages empty array is definitely not null.

    Also I'd argue that zero faces is a valid input. Why can't I have an empty model?

  • Custom User Avatar

    Design question: Is there any reason to modify unsigned int *count and return Vertex* inside a function when it's equivalent to std::vector<Vertex>, and test fixture uses std::vector<Vertex> as expected value? Since this is a C++ kata and not a C kata std::vector<Vertex> would be the natural choice except for very specific reasons, which I don't see any.

  • Custom User Avatar

    Vertex is a custom class so its definition should be given in the description. (We can't see Preloaded code)

  • Custom User Avatar

    Expected: true, Actual: false is not acceptable test feedback (it doesn't tell you why it's wrong).