Aggiunto nuovo operatore const [] alle stringhe
git-svn-id: svn://10.65.10.50/trunk@286 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									5b8d614731
								
							
						
					
					
						commit
						8415f44f68
					
				@ -316,8 +316,8 @@ void TForm_item::send_message(const TString& cmd, TForm_item* des) const
 | 
			
		||||
                } else
 | 
			
		||||
                  if (cmd[0] == '"')
 | 
			
		||||
                  {
 | 
			
		||||
                    TString val(&cmd[1]);
 | 
			
		||||
                    val.cut(val.len()-1);
 | 
			
		||||
                    TString val(cmd);
 | 
			
		||||
                    val.strip("\"");
 | 
			
		||||
                    des->set(val);
 | 
			
		||||
                  } else
 | 
			
		||||
                    error_box("Unknown message in item '%s': '%s'",
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
//      $Id: relation.cpp,v 1.11 1994-09-22 16:47:45 guy Exp $
 | 
			
		||||
//      $Id: relation.cpp,v 1.12 1994-09-23 10:58:03 guy Exp $
 | 
			
		||||
// relation.cpp
 | 
			
		||||
// fv 12/8/93
 | 
			
		||||
// relation class for isam files
 | 
			
		||||
@ -1183,10 +1183,10 @@ TFieldref& TFieldref::operator =(const TString& s)
 | 
			
		||||
  if (par > 0)
 | 
			
		||||
  {
 | 
			
		||||
    pos = par+1;
 | 
			
		||||
    _from = atoi(&s[pos]);
 | 
			
		||||
    _from = atoi(s.mid(pos));
 | 
			
		||||
    if (_from > 0) _from--; else _from = 0;
 | 
			
		||||
    par = s.find(',', pos);
 | 
			
		||||
    if (par > 0) _to = atoi(&s[par+1]); else _to = -1;
 | 
			
		||||
    if (par > 0) _to = atoi(s.mid(par+1)); else _to = -1;
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -61,6 +61,8 @@ public:
 | 
			
		||||
    CHECKD(i >= 0 && i <= _size, "Bad string subscript: ", i);
 | 
			
		||||
    return _str[i]; 
 | 
			
		||||
  }                 
 | 
			
		||||
  
 | 
			
		||||
  char operator[](int i) const { return _str[i]; }            // TString[i] -> _str[i]
 | 
			
		||||
 | 
			
		||||
  int size() const { return _size; }
 | 
			
		||||
  int len() const { return strlen(_str); }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user