![](https://secure.gravatar.com/avatar/c2fe677a63ffd5b7ffd8facbf327dad0.jpg?s=120&d=mm&r=g)
I am currently working on Inline Function Removal and while replacing calls to sp_repr_set_attr with direct calls to the wrapped member functions I noticed that the wrapped function is defined as void. There are tests that are run to check if sp_repr_set_attr fails. sp_repr_set_attr always returns true although I suspect this was designed to change at some point If sp_repr_set_attr is replaced in one of these tests for example: /// \todo fixme: Exception if object is NULL? */ if (!sp_repr_set_attr(object->repr, key, NULL)) {
No value will return and the compilation will fail. Should I just comment out these tests or remove them and leave the todo? As of now the tests just accept true from sp_repr_set_attr and they don't actually check anything.
Jimmy Varvaro
![](https://secure.gravatar.com/avatar/eb3fe37da4a199eb4e3b479d8a57f808.jpg?s=120&d=mm&r=g)
On Mon, 28 Apr 2008 17:39:01 -0400, Jimmy <supershospy@...400...> wrote:
No value will return and the compilation will fail. Should I just comment out these tests or remove them and leave the todo? As of now the tests just accept true from sp_repr_set_attr and they don't actually check anything.
Feel free to remove the tests. In the future we'll use exceptions to indicate failure when that is required.
-mental
participants (2)
-
Jimmy
-
MenTaLguY