summaryrefslogtreecommitdiff
path: root/project2/fileRows.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-08-05 23:48:05 +0000
committerrandomdan <randomdan@localhost>2010-08-05 23:48:05 +0000
commitc25b99c4e726421bb21d88e683502a81b3b86113 (patch)
tree48a565bacfb18a508a75b946327fa161ddaa86d6 /project2/fileRows.cpp
parentAdd ProcRows as a direct extension of FileRows (diff)
downloadproject2-c25b99c4e726421bb21d88e683502a81b3b86113.tar.bz2
project2-c25b99c4e726421bb21d88e683502a81b3b86113.tar.xz
project2-c25b99c4e726421bb21d88e683502a81b3b86113.zip
Cache the result of default column compose
Use this cache now lots of things are const refs
Diffstat (limited to 'project2/fileRows.cpp')
-rw-r--r--project2/fileRows.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp
index 239ad6b..855136f 100644
--- a/project2/fileRows.cpp
+++ b/project2/fileRows.cpp
@@ -26,7 +26,7 @@ _FileRows::columnCount() const
return columns.size();
}
-Glib::ustring
+const Glib::ustring &
_FileRows::getColumnName(unsigned int col) const
{
return columns[col];
@@ -93,13 +93,13 @@ _FileRows::execute() const
}
}
-Glib::ustring
+const Glib::ustring &
_FileRows::getCurrentValue(unsigned int col) const
{
return *values[col];
}
-Glib::ustring
+const Glib::ustring &
_FileRows::getCurrentValue(const Glib::ustring & id) const
{
Values::const_iterator v = values.begin();
@@ -108,7 +108,7 @@ _FileRows::getCurrentValue(const Glib::ustring & id) const
return **v;
}
}
- return "";
+ throw PerRowValues::FieldDoesNotExist();
}
void