~unity-team/nux/texture-atlas

« back to all changes in this revision

Viewing changes to NuxCore/Win32Dialogs/NWin32CustomDialog.cpp

  • Committer: Nicolas d'Offay
  • Date: 2012-11-16 18:23:48 UTC
  • mfrom: (682.2.25 trunk)
  • Revision ID: nicolas.doffay@canonical.com-20121116182348-ygq13lkwgbugen04
Additional work to get the texture atlas class running as a normal texture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    nuxAssert (Description);
79
79
    nuxAssert (Filter);
80
80
 
81
 
    FilterDesc.push_back (NString (Description) );
82
 
    Filters.push_back (NString (Filter) );
 
81
    FilterDesc.push_back(std::string(Description));
 
82
    Filters.push_back(std::string(Filter));
83
83
    NumFilters++;
84
84
  }
85
85
 
102
102
 
103
103
    for (unsigned int i = 0; i < NumFilters; i++)
104
104
    {
105
 
      size += FilterDesc[i].Length() + Filters[i].Length() + 2; // + 2 for for the NULL char at the end of each string
 
105
      size += FilterDesc[i].length() + Filters[i].length() + 2; // + 2 for for the NULL char at the end of each string
106
106
    }
107
107
 
108
108
    size += 1;  // + 1 for the final NULL char. The total string is terminated by two NULL char
115
115
 
116
116
    for (unsigned int i = 0; i < NumFilters; i++)
117
117
    {
118
 
      Memcpy ( (void *) (FormattedFilter + l), *FilterDesc[i], FilterDesc[i].Length() );
119
 
      l += FilterDesc[i].Length();
 
118
      Memcpy((void *) (FormattedFilter + l), FilterDesc[i].c_str(), FilterDesc[i].length());
 
119
      l += FilterDesc[i].length();
120
120
      FormattedFilter[l] = 0;
121
121
      l++;
122
 
      Memcpy ( (void *) (FormattedFilter + l), *Filters[i], Filters[i].Length() );
123
 
      l += Filters[i].Length();
 
122
      Memcpy ( (void *) (FormattedFilter + l), Filters[i].c_str(), Filters[i].length() );
 
123
      l += Filters[i].length();
124
124
      FormattedFilter[l] = 0;
125
125
      l++;
126
126
    }