Author Topic: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly  (Read 13440 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #15 on: February 13, 2019, 08:02:04 pm »
1. Do not use lambda captures if you don't understand them.
2. Why do you need a capture in this case? The frame is passed as a parameter.
3. What does Temp mean? To me it is the same as using My, Mine, Random, Some, etc.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #16 on: February 14, 2019, 02:02:27 am »
1. Do not use lambda captures if you don't understand them.
Oh, I need to learn it. Should be easy.  :)
Quote
2. Why do you need a capture in this case? The frame is passed as a parameter.
You are correct, no need capture here.

Quote
3. What does Temp mean? To me it is the same as using My, Mine, Random, Some, etc.
What about shortLiveFrame or transientFrame?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #17 on: February 14, 2019, 07:06:57 pm »
transientFrame has different meaning in some OS/wms.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #18 on: February 16, 2019, 06:23:45 am »
transientFrame has different meaning in some OS/wms.
OK, thanks.

I now use the "shortLiveFrame". I have committed the patch to trunk now(r11571). Thanks all guys for your help.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #19 on: February 17, 2019, 02:15:33 pm »
Hi,
i can not build the latest C::B trunk on linux, because of the error message
Code
function is not a member of std
To fix this i have to add
Code
#include <functor>
at the top of the edited files

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #20 on: February 17, 2019, 03:10:26 pm »
Hi,
i can not build the latest C::B trunk on linux, because of the error message
Code
function is not a member of std
To fix this i have to add
Code
#include <functor>
at the top of the edited files
Sorry about that, because I don't use Linux most of the time. This does not happen on my Windows GCC 7.2. I think you can push your changes. Thanks.
« Last Edit: February 17, 2019, 03:18:46 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #21 on: February 17, 2019, 03:55:18 pm »
@bluehazzard: There is no <functor> header it is <functional> ...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #22 on: February 17, 2019, 04:05:41 pm »
@bluehazzard: There is no <functor> header it is <functional> ...
yes, my fault. It is <functional>

Sorry about that, because I don't use Linux most of the time. This does not happen on my Windows GCC 7.2. I think you can push your changes. Thanks.
I think this is because windows uses precompiled headers? And linux not?
I will add the headers only in the cpp source files where it is needed

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #23 on: February 17, 2019, 04:14:46 pm »
Well here we are.... I have commited with the wrong message text... Is there a way to edit the commit message?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #24 on: February 17, 2019, 04:21:43 pm »
Well here we are.... I have commited with the wrong message text... Is there a way to edit the commit message?
Yes, you can edit the commit message. Under Windows, you can do this in TortoiseSVN, and right click of that commit, it will shown in context menu.

PS: I remember I did this several years ago. Now, I don't use TortoiseSVN for a long time. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #25 on: February 17, 2019, 04:27:37 pm »
Ok, it worked... Thank you!

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: wxAuiManager preview issue under wxSmith cause C::B can't exit correctly
« Reply #26 on: February 18, 2019, 12:38:13 am »
I think this is because windows uses precompiled headers? And linux not?
More likely that a different code path pulls in different transitive includes, thats why you should always make your includes self contained :).