[f-spot] Remove unneeded casts in PhotoStore



commit cdd3550e851bb05bade42251e3f34917552e0023
Author: Ruben Vermeersch <ruben savanne be>
Date:   Fri May 22 15:35:05 2009 +0200

    Remove unneeded casts in PhotoStore
---
 src/PhotoStore.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/PhotoStore.cs b/src/PhotoStore.cs
index 5a96c9a..15a6a4d 100644
--- a/src/PhotoStore.cs
+++ b/src/PhotoStore.cs
@@ -255,7 +255,7 @@ public class PhotoStore : DbStore<Photo> {
 		
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["photo_id"]);
-			Photo photo = LookupInCache (id) as Photo;
+			Photo photo = LookupInCache (id);
 				
 			if (photo == null) {
 				//Console.WriteLine ("Photo {0} not found", id);
@@ -291,7 +291,7 @@ public class PhotoStore : DbStore<Photo> {
 
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["photo_id"]);
-			Photo photo = LookupInCache (id) as Photo;
+			Photo photo = LookupInCache (id);
 				
 			if (photo == null) {
 				//Console.WriteLine ("Photo {0} not found", id);
@@ -383,7 +383,7 @@ public class PhotoStore : DbStore<Photo> {
 		if (photo == null)
 			return null;
 
-		Photo cached = LookupInCache (photo.Id) as Photo;
+		Photo cached = LookupInCache (photo.Id);
 
 		if (cached != null)
 			return cached;
@@ -426,7 +426,7 @@ public class PhotoStore : DbStore<Photo> {
 			photo.MD5Sum = md5_sum;
 
 			// get cached if possible
-			Photo cached = LookupInCache (photo.Id) as Photo;
+			Photo cached = LookupInCache (photo.Id);
 
 			if (cached != null)
 			{
@@ -486,7 +486,7 @@ public class PhotoStore : DbStore<Photo> {
 
 	public override void Commit (Photo item)
 	{
-		Commit (new Photo [] {item as Photo});
+		Commit (new Photo [] {item});
 	}
 
 	public void Commit (Photo [] items)
@@ -871,7 +871,7 @@ public class PhotoStore : DbStore<Photo> {
 		List<Photo> query_result = new List<Photo> ();
 		while (reader.Read ()) {
 			uint id = Convert.ToUInt32 (reader ["id"]);
-			Photo photo = LookupInCache (id) as Photo;
+			Photo photo = LookupInCache (id);
 
 			if (photo == null) {
 				photo = new Photo (id,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]