Skip to content

Commit

Permalink
Fixup for AppVeyor compiler version
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Nov 28, 2017
1 parent 900348b commit f80bfd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Plugins/Faces/FeatureDetectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public FeatureDetectionBase()

protected TR BorrowCascade<TR>(string fileNameKey, Func<CvHaarClassifierCascade, TR> operation)
{
if (fileNames != null && fileNames.TryGetValue(fileNameKey, out var name) == true) {
string name;
if (fileNames != null && fileNames.TryGetValue(fileNameKey, out name) == true) {
if (name != null) {
return CascadePool.Shared.Borrow(name, operation, 10000);
}
Expand Down
4 changes: 1 addition & 3 deletions Plugins/Faces/ImageResizer.Plugins.Faces.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@
<None Include="packages.config" />
<None Include="readme.md" />
</ItemGroup>
<ItemGroup>
<Folder Include="Faces2\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion Plugins/Faces/Pools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public TR Borrow<TR>(string key, Func<T,TR> operation, int timeoutMs)
TR BorrowItemInternal<TR>(string key, Func<T, TR> operation)
{
var bag = pool.GetOrAdd(key, name => new ConcurrentBag<T>());
if (bag.TryTake(out var c))
T c;
if (bag.TryTake(out c))
{
return RunAndReturnToBag(bag, c, operation);
}
Expand Down

0 comments on commit f80bfd3

Please sign in to comment.