From 4023418a6b98474576befcac5cdf7545b8e2ef41 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Tue, 25 Sep 2012 14:14:05 +0100 Subject: [PATCH] ENH: codeStream: sha1 calculation cached --- .../dictionary/functionEntries/codeStream/codeStream.C | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C index de0b87d9ea9..cfe9de32735 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,11 +104,8 @@ Foam::functionEntries::codeStream::getFunction // codeName: codeStream + _<sha1> // codeDir : _<sha1> - dynamicCode dynCode - ( - "codeStream" + context.sha1().str(true), - context.sha1().str(true) - ); + std::string sha1Str(context.sha1().str(true)); + dynamicCode dynCode("codeStream" + sha1Str, sha1Str); // Load library if not already loaded // Version information is encoded in the libPath (encoded with the SHA1) -- GitLab