~brandontschaefer/nux/xim-tests

« back to all changes in this revision

Viewing changes to Nux/Validator.cpp

  • Committer: Brandon Schaefer
  • Date: 2012-10-19 00:23:27 UTC
  • mfrom: (637.2.55 trunk)
  • Revision ID: brandon.schaefer@canonical.com-20121019002327-60e88jn3k8chi7gt
* Merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
  bool Validator::InitRegExp()
39
39
  {
40
40
#if defined(NUX_OS_WINDOWS)
41
 
    regex_ = _regexp_str.GetTCharPtr();
 
41
    regex_ = _regexp_str.c_str();
42
42
    return true;
43
43
#else
44
44
    const char *error;
45
45
    int   erroffset;
46
46
    _regexp = pcre_compile(
47
 
      _regexp_str.GetTCharPtr(),    /* the pattern */
 
47
      _regexp_str.c_str(),    /* the pattern */
48
48
      PCRE_MULTILINE,
49
49
      &error,         /* for error message */
50
50
      &erroffset,     /* for error offset */
52
52
 
53
53
    if (!_regexp)
54
54
    {
55
 
      nuxDebugMsg("[IntegerValidator::IntegerValidator] Invalid regular expression: %s", _regexp_str.GetTCharPtr());
 
55
      nuxDebugMsg("[IntegerValidator::IntegerValidator] Invalid regular expression: %s", _regexp_str.c_str());
56
56
      return false;
57
57
    }    
58
58
    return true;