From Trajce Nicklov, fixes to warnings
This commit is contained in:
parent
e3a1f664b9
commit
c16d55fa9b
@ -92,7 +92,7 @@ class OSGWIDGET_EXPORT Input: public Label
|
|||||||
unsigned int _textLength;
|
unsigned int _textLength;
|
||||||
|
|
||||||
std::vector<point_type> _offsets;
|
std::vector<point_type> _offsets;
|
||||||
std::vector<point_type> _wordsOffsets;
|
std::vector<unsigned int> _wordsOffsets;
|
||||||
std::vector<point_type> _widths;
|
std::vector<point_type> _widths;
|
||||||
osg::ref_ptr<Widget> _cursor;
|
osg::ref_ptr<Widget> _cursor;
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*) {
|
|||||||
|
|
||||||
if (_selectionMax-_selectionMin>0)
|
if (_selectionMax-_selectionMin>0)
|
||||||
{
|
{
|
||||||
point_type deleteToIdx = _selectionMax;
|
unsigned int deleteToIdx = _selectionMax;
|
||||||
for (unsigned int i=0; i < s.size()-_selectionMin; ++i)
|
for (unsigned int i=0; i < s.size()-_selectionMin; ++i)
|
||||||
{
|
{
|
||||||
s[_selectionMin+i] = deleteToIdx+i+1 < s.size() ? s[deleteToIdx+i+1] : ' ';
|
s[_selectionMin+i] = deleteToIdx+i+1 < s.size() ? s[deleteToIdx+i+1] : ' ';
|
||||||
@ -429,7 +429,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*) {
|
|||||||
else
|
else
|
||||||
if (mask & osgGA::GUIEventAdapter::MODKEY_CTRL)
|
if (mask & osgGA::GUIEventAdapter::MODKEY_CTRL)
|
||||||
{
|
{
|
||||||
point_type deleteToIdx = _textLength;
|
unsigned int deleteToIdx = _textLength;
|
||||||
for (unsigned int i=0; i<_wordsOffsets.size()-1; ++i)
|
for (unsigned int i=0; i<_wordsOffsets.size()-1; ++i)
|
||||||
{
|
{
|
||||||
if (_wordsOffsets.at(i) <= _index && _index < _wordsOffsets.at(i+1))
|
if (_wordsOffsets.at(i) <= _index && _index < _wordsOffsets.at(i+1))
|
||||||
@ -472,7 +472,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*) {
|
|||||||
|
|
||||||
if (_selectionMax-_selectionMin>0)
|
if (_selectionMax-_selectionMin>0)
|
||||||
{
|
{
|
||||||
point_type deleteToIdx = _selectionMax;
|
unsigned int deleteToIdx = _selectionMax;
|
||||||
for (unsigned int i=0; i < s.size()-_selectionMin; ++i)
|
for (unsigned int i=0; i < s.size()-_selectionMin; ++i)
|
||||||
{
|
{
|
||||||
s[_selectionMin+i] = deleteToIdx+i+1 < s.size() ? s[deleteToIdx+i+1] : ' ';
|
s[_selectionMin+i] = deleteToIdx+i+1 < s.size() ? s[deleteToIdx+i+1] : ' ';
|
||||||
|
Loading…
Reference in New Issue
Block a user