comparison Core/SQLite/Connection.cpp @ 759:8cfc6119a5bd dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:04:55 +0200
parents 2d0a347e8cfc
children a811bdf8b8eb
comparison
equal deleted inserted replaced
605:b82292ba2083 759:8cfc6119a5bd
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 6 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
109 109
110 void Connection::ClearCache() 110 void Connection::ClearCache()
111 { 111 {
112 for (CachedStatements::iterator 112 for (CachedStatements::iterator
113 it = cachedStatements_.begin(); 113 it = cachedStatements_.begin();
114 it != cachedStatements_.end(); it++) 114 it != cachedStatements_.end(); ++it)
115 { 115 {
116 delete it->second; 116 delete it->second;
117 } 117 }
118 118
119 cachedStatements_.clear(); 119 cachedStatements_.clear();
329 FunctionContext context(rawContext, argc, argv); 329 FunctionContext context(rawContext, argc, argv);
330 330
331 void* payload = sqlite3_user_data(rawContext); 331 void* payload = sqlite3_user_data(rawContext);
332 assert(payload != NULL); 332 assert(payload != NULL);
333 333
334 IScalarFunction& func = *(IScalarFunction*) payload; 334 IScalarFunction& func = *reinterpret_cast<IScalarFunction*>(payload);
335 func.Compute(context); 335 func.Compute(context);
336 } 336 }
337 337
338 338
339 static void ScalarFunctionDestroyer(void* payload) 339 static void ScalarFunctionDestroyer(void* payload)
340 { 340 {
341 assert(payload != NULL); 341 assert(payload != NULL);
342 delete (IScalarFunction*) payload; 342 delete reinterpret_cast<IScalarFunction*>(payload);
343 } 343 }
344 344
345 345
346 IScalarFunction* Connection::Register(IScalarFunction* func) 346 IScalarFunction* Connection::Register(IScalarFunction* func)
347 { 347 {