-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract parse()
function, and add unittest for Diceparser
#15
base: master
Are you sure you want to change the base?
Changes from 1 commit
7e526ae
e1fa9ab
e3db79e
cb20da0
1b00f06
fdf87e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ void FilterNode::run(ExecutionNode* previous) | |
{ | ||
if(m_validator->hasValid(tmp,m_eachValue)) | ||
{ | ||
Die* tmpdie = new Die(); | ||
Die* tmpdie = new Die(-1,-1); // yaaaaaarggl what does this block of code does? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All those code samples are doing the same thing, make a copy a die to do some work about this die without changing the original die. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so a copie constructor should do the trick. I will test. |
||
*tmpdie=*tmp; | ||
diceList2.append(tmpdie); | ||
tmp->displayed(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is useful to put a shared pointer on a static member. Both mechanisms have quiet the same goal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are totally right, thanks for pointing it.