Changed addon:CheckDisplayRecipe() to CanDisplayRecipe() - it's only ever used as a helper function for addon:UpdateFilters().
Changed addon:CheckDisplayRecipe() to CanDisplayRecipe() - it's only ever used as a helper function for addon:UpdateFilters().
In CanDisplayRecipe(): removed function parameters - they were not needed since the information is all file-scope. Removed profession check since it is already performed in addon:UpdateFilters(). Renamed variables "generaldb" and "flags" to "general_filters" and "recipe_flags" for clarity. Added some local variables to reduce some table lookups. Fixed named flag numbering (fixes ticket 864).
Moved addon:UpdateFilters() into the do block with CanDisplayRecipe() since it only needs to be accessible from that function.
In addon:UpdateFilters(): Re-write for improved efficiency/readability, removed all parameters as unnecessary.