Trying to remove an event from the event queue

Hello, I’m trying to remove an event by using SDL_PeepEvents, SDL_MOUSEBUTTONUP to be specific.
This is the code I’m using, but it does not seem to work.

bool has_left_click_event()
    SDL_Event eve;
    int count = SDL_PeepEvents(&eve, 1, SDL_GETEVENT, SDL_MOUSEBUTTONUP, 0);
    SDL_Log("%i", count);
    if(count > 0) {
        if(eve.button.button == SDL_BUTTON_LEFT) {
            SDL_Log("sdfsdf"); // testing
            return true;
    return false;

and I don’t really understand the minType and the maxType paramters of SDL_PeepEvents

minType and maxType are events from the enum SDL_EventType defined here:

So that SDL_PeepEvents only applies to events that after minType and before maxType.

If you only want to check one type of events, set for instance:
minType = maxType = SDL_BUTTON_LEFT