Closed ajtruckle closed 2 years ago
Your code is not using MS-GSL. So I (just a contributor, not a maintainer) don't understand why you are opening a GSL issue. This is an issue with your code not with MS-GSL. In my opinion your question(s) is/are better suited at stackoverflow.com or codereview.stackexchange.com. I appreciate that you modernize your code and I am willing to help, so if you ask a question on the mentioned sites feel free to address me there ("@WernerHenze" in a comment).
@beinhaerter All valid points and I agree 100%. I also appreciate your willingness to help. I'll prepare the first question now.
I have a few issues here concerning the
CMonthCalCtrl
control so I thought I would collate them all together in one issue ticket.BOLDDAY
Most of it is related to setting day states (making them bold) and the concept is described in detail here. You have to define a macro:
This macro is used in the following function:
Everywhere I use this
BOLDDAY
macro I get a code analysis warning (C26481):It is not clear to me if the problem is with the
BOLDDAY
macro or my own code?Collection Query 1
Then, I have a related query about the collection of
MONTHDAYSTATE
objects. For example:If I turn
pDayState
into:auto pDayState = std::make_unique<MONTHDAYSTATE>(iMonthCount);
I am then not sure how to proceed:InitDayStateArray
the parameterpDayState.release()
but then it seems little point to do that because we will need to clean up the memory. So this is a no no.InitDayStateArray
the parameterpDayState.get()
but it is not clear to me if that will be the correct way forward.InitDayStateArray
can now be simplified if we just pass the new smart pointer?I am sorry if these are too many questions in one and I am happy to split if required.
Collection Query 2
I have a couple of event handlers. Here is an example:
Again, it is similar is the sense that we end up calling the same method, but the way we go about it is slightly different.
In Summary
BOLDDAY
macro.MONTHDAYSTATE
collection to avoid thenew
/ `delete calls etc..