Public feed #721805

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-10-01 15:37 UTC
rendered paste body
Common::String POSIXFilesystemNode::getName() const {
	if (_path == "")
		return "";
	
	if (_displayName == "") {
		const char *start = _path.c_str();
		const char *cur = start + _path.size() - 2;
	
		while (cur >= start && *cur != '/') {
			--cur;
		}
		
		_displayName = cur + 1;
	}
	
	return _displayName;
}

./backends/fs/posix/posix-fs.cpp: In member function ‘virtual Common::String POSIXFilesystemNode::getName() const’:
./backends/fs/posix/posix-fs.cpp:236: error: no match for ‘operator=’ in ‘((const POSIXFilesystemNode*)this)->POSIXFilesystemNode::_displayName = (cur + 1u)’
./common/str.h:105: note: candidates are: Common::String& Common::String::operator=(const char*) <near match>
./common/str.h:106: note:                 Common::String& Common::String::operator=(const Common::String&) <near match>
./common/str.h:107: note:                 Common::String& Common::String::operator=(char) <near match>