Closed chrisasc closed 4 years ago
Ready for next round. I am not sure about the comment I made in the code though...
Review done. Can you run our C++ CI localy for these programs? Would it work if you just copy them on a local branch (and add stuff to CMakeLists)? Or is it more complicated?
Did you address this @chrisasc ?
Review done. Can you run our C++ CI localy for these programs? Would it work if you just copy them on a local branch (and add stuff to CMakeLists)? Or is it more complicated?
Yes, just did it! Ready for (hopefully) last round now
I added one commit. Looks good to me. Please answer to one last comment I made. After we figure out what formatting to use we can merge.
Update from last two commits:
Ready for next round! Also,
I added one commit. Looks good to me. Please answer to one last comment I made. After we figure out what formatting to use we can merge.
was this the clang-tidy question Torbjørn answered?
It's clang-format
which does this. With BinPackParameters: true
then the result is
someFunction("GenICamTL", 1, 1, 0, 0, 0, 0, "progressive", -1, "default", -1, "false", "default", zividDevice, 0, 0,
&Framegrabber);
I don't like that either. This could have worked if the max line length was shorter in this case.
For example with ColumnLimit: 80
(instead of 120):
someFunction("GenICamTL", 1, 1, 0, 0, 0, 0, "progressive", -1, "default",
-1, "false", "default", zividDevice, 0, 0, &Framegrabber);
However, that's not a good idea for the rest of the code.
I suggest we keep it as is.
I couldn't find a rule that would work selectively on function calls with a large number of (short) arguments.
It's
clang-format
which does this. WithBinPackParameters: true
then the result issomeFunction("GenICamTL", 1, 1, 0, 0, 0, 0, "progressive", -1, "default", -1, "false", "default", zividDevice, 0, 0, &Framegrabber);
I don't like that either. This could have worked if the max line length was shorter in this case. For example with
ColumnLimit: 80
(instead of 120):someFunction("GenICamTL", 1, 1, 0, 0, 0, 0, "progressive", -1, "default", -1, "false", "default", zividDevice, 0, 0, &Framegrabber);
However, that's not a good idea for the rest of the code.
I suggest we keep it as is.
I agree, it looks a bit stupid on this specific function, but I think in general it looks nice to have one argument per line.
What do you think @SatjaSivcev? Is it okay if I rebase and merge?
One last thing. Move 'Procedures' folder into 'hdev' and make sure the path from Readme is correct and also from the hdev scripts. Scripts need to be able ti find the procedure.
Updated C++ Halcon samples after evaluating capture runtime using different methods.
CMakelists:
CaptureViaGenICam:
CaptureViaZivid: