I realized while setting up this function, this is the code version of sarcasm.

  • 2
    Are you using global variables or what? 🤔
  • 3
    So many things wrong with that piece, but...
    undispatchedEvents = 0, maaaaaybe?
  • 5
    I'll just asume that the -- operator is overloaded.
  • 1
    @endor This is obviously a class member function (Buffer::), undispatchEvents is some member data of the class keeping track of how many events have been placed in the event buffer but not dispatched to the system.

    @Kimmax What could possibly be wrong with it? What happens if there's a situation where two events are dispatched at the same time, then it becomes -1 and it's an infinite loop. So thanks, but no.

    @Batburger it's an int. I mentioned I was just setting up the function, this isn't what the code looked like for more than 30 seconds plus screenshot.
Your Job Suck?
Get a Better Job
Add Comment