Author Topic: Guard needed in r13541  (Read 4020 times)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Guard needed in r13541
« on: August 12, 2024, 11:46:09 am »
Revision r13541 added some wx3.2 font styles that are not present in wx3.0, but we still support 3.0 (at least on Linux). These values must be guarded with wxCHECK_VERSION(3, 1, 2) in wxssimplefonteditordlg.cpp:

Code
wxFONTWEIGHT_THIN
wxFONTWEIGHT_EXTRALIGHT
wxFONTWEIGHT_MEDIUM
wxFONTWEIGHT_SEMIBOLD
wxFONTWEIGHT_EXTRABOLD
wxFONTWEIGHT_HEAVY
wxFONTWEIGHT_EXTRAHEAVY
wxFONTWEIGHT_INVALID

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Guard needed in r13541
« Reply #1 on: August 12, 2024, 12:54:39 pm »
Maybe Morten will do this?  :)
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 Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: Guard needed in r13541
« Reply #2 on: August 12, 2024, 02:19:17 pm »
Proposed patch attached

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 54
Re: Guard needed in r13541
« Reply #3 on: August 13, 2024, 11:13:18 am »
Is there not a CI build that runs for Windows and Linux on any merge like bigger projects do? This would have detected this issue.

Another thing with big dev teams there is peer revies of code changes before they are merged into the trunk. Does this occur with CB? This may have picked it up depending on the reviewers skills.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: Guard needed in r13541
« Reply #4 on: August 13, 2024, 12:54:48 pm »
Sourceforge does not have these utilities, or at least I do not know about them. Peer reviewing is done sometimes for complex changes.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: Guard needed in r13541
« Reply #5 on: August 13, 2024, 03:53:30 pm »
Patch applied in r13542.