~jpakkane/+junk/osx-teststuff

« back to all changes in this revision

Viewing changes to Frame.cc

  • Committer: Jussi Pakkanen
  • Date: 2012-03-14 12:23:31 UTC
  • Revision ID: jussi.pakkanen@canonical.com-20120314122331-wlfvpi842oa9e54d
Add invalid frames.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include "Frame.h"
23
23
 
24
 
Frame::Frame() : id(-1) {
 
24
Frame::Frame() : id(INVALID_FRAME_ID) {
25
25
}
26
26
 
27
27
Frame::Frame(int id_, const Touch &t) : id(id_){
28
28
    touches.push_back(t);
 
29
    if(t.is_invalid() && id_ != INVALID_FRAME_ID)
 
30
        printf("Adding invalid touch to a valid frame.\n");
 
31
    if(!t.is_invalid() && id == INVALID_FRAME_ID)
 
32
        printf("Adding valid touch to an invalid frame.\n");
29
33
}
30
34
 
31
35
Frame::Frame(int id_, const std::vector<Touch> &given_touches) : id(id_){