Commit f3082969 authored by loring's avatar loring

clean up a couple of warnings related to const use on the

return of primative type "type qualifiers ignored on function
return type"


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@26876 18c085ea-50e0-402c-830e-de6fd14e8384
parent a6e04c06
......@@ -126,18 +126,18 @@ avtCurveExpression::~avtCurveExpression()
// ****************************************************************************
void
avtCurveExpression::GetMacro(std::vector<std::string> &args, std::string &ne,
avtCurveExpression::GetMacro(std::vector<std::string> &args, std::string &ne,
Expression::ExprType &type)
{
char new_expr[2048];
if (-1 == xvar)
{
SNPRINTF(new_expr,2048, "%s(%s)", function.c_str(), args[0].c_str());
SNPRINTF(new_expr,2048, "%s(%s)", function.c_str(), args[0].c_str());
}
else
{
SNPRINTF(new_expr, 2048, "curve_domain(%s, %s(coord(%s)[0]))",
args[0].c_str(), yFuncs[xvar], args[0].c_str());
SNPRINTF(new_expr, 2048, "curve_domain(%s, %s(coord(%s)[0]))",
args[0].c_str(), yFuncs[xvar], args[0].c_str());
}
type = Expression::CurveMeshVar;
ne = new_expr;
......@@ -151,14 +151,14 @@ avtCurveExpression::GetMacro(std::vector<std::string> &args, std::string &ne,
// Determines if the passed function name is a supported y-coordinate
// function.
//
// Programmer: Kathleen Bonnell
// Programmer: Kathleen Bonnell
// Creation: March 9, 2009
//
// Modifications:
//
// ****************************************************************************
const int
int
avtCurveExpression::IsYFunc(const char *func) const
{
for (int i = 0; i < nFuncs; ++i)
......@@ -174,14 +174,14 @@ avtCurveExpression::IsYFunc(const char *func) const
// Determines if the passed function name is a supported x-coordinate
// function.
//
// Programmer: Kathleen Bonnell
// Programmer: Kathleen Bonnell
// Creation: March 9, 2009
//
// Modifications:
//
// ****************************************************************************
const int
int
avtCurveExpression::IsXFunc(const char *func) const
{
for (int i = 0; i < nFuncs; ++i)
......@@ -197,14 +197,14 @@ avtCurveExpression::IsXFunc(const char *func) const
// Determines if the passed function name is a supported x-coordinate
// or y-coordinate function.
//
// Programmer: Kathleen Bonnell
// Programmer: Kathleen Bonnell
// Creation: March 9, 2009
//
// Modifications:
//
// ****************************************************************************
const bool
bool
avtCurveExpression::ValidFunctionName(const char *func)
{
int index = IsYFunc(func);
......@@ -214,7 +214,7 @@ avtCurveExpression::ValidFunctionName(const char *func)
if (-1 != index)
xvar = index;
}
return index != -1;
return index != -1;
}
......@@ -225,7 +225,7 @@ avtCurveExpression::ValidFunctionName(const char *func)
// Walks through the arguments and creates filters.
// Checks to ensure the first argument is the needed function name.
//
// Programmer: Kathleen Bonnell
// Programmer: Kathleen Bonnell
// Creation: March 9, 2009
//
// Modifications:
......@@ -233,7 +233,7 @@ avtCurveExpression::ValidFunctionName(const char *func)
// ****************************************************************************
void
avtCurveExpression::ProcessArguments(ArgsExpr *args,
avtCurveExpression::ProcessArguments(ArgsExpr *args,
ExprPipelineState *state)
{
if (args == NULL)
......@@ -246,7 +246,7 @@ avtCurveExpression::ProcessArguments(ArgsExpr *args,
int nargs = arguments->size();
if (nargs == 0)
{
EXCEPTION2(ExpressionException, outputVariableName,
EXCEPTION2(ExpressionException, outputVariableName,
"avtCurveExpression: No arguments given.");
}
// First arg should be a function name.
......@@ -255,15 +255,15 @@ avtCurveExpression::ProcessArguments(ArgsExpr *args,
std::string arg_type = first_tree->GetTypeName();
if (arg_type != "StringConst")
{
EXCEPTION2(ExpressionException, outputVariableName,
EXCEPTION2(ExpressionException, outputVariableName,
"avtCurveExpression: Invalid first argument."
"Expected a function name.");
}
function = dynamic_cast<StringConstExpr*>(first_tree)->GetValue();
function = dynamic_cast<StringConstExpr*>(first_tree)->GetValue();
if (!ValidFunctionName(function.c_str()))
{
EXCEPTION2(ExpressionException, function.c_str(),
EXCEPTION2(ExpressionException, function.c_str(),
"avtCurveExpression: Unsupported curve function.");
}
......
......@@ -79,9 +79,9 @@ class EXPRESSION_API avtCurveExpression : public avtMacroExpressionFilter
virtual void ProcessArguments(ArgsExpr *args,
ExprPipelineState *state);
private:
const int IsYFunc(const char *var) const;
const int IsXFunc(const char *var) const;
const bool ValidFunctionName(const char *func);
int IsYFunc(const char *var) const;
int IsXFunc(const char *var) const;
bool ValidFunctionName(const char *func);
int xvar;
std::string function;
};
......
This diff is collapsed.
......@@ -48,7 +48,7 @@
#include <avtDatasetToDatasetFilter.h>
struct BlockIdDatasetPair
struct BlockIdDatasetPair
{
std::string blockId;
vtkDataSet *dataSet;
......@@ -77,16 +77,16 @@ class AVTFILTERS_API avtSubsetBlockMergeFilter : public avtDatasetToDatasetFilte
virtual const char *GetType(void) { return "avtSubsetBlockMergeFilter"; };
virtual const char *GetDescription(void) { return "Merge all datasets of the same block into one dataset"; };
protected:
virtual void Execute();
virtual void PostExecute();
private:
void AddDatasetToMap(std::map<int, std::vector<BlockIdDatasetPair> > &, vtkDataSet *, const std::string);
const int GetIndexFromBlockId(const std::string, const std::vector<std::string> &) const;
const int GetProcessorIdFromBlockId(const int) const;
int GetIndexFromBlockId(const std::string, const std::vector<std::string> &) const;
int GetProcessorIdFromBlockId(const int) const;
avtDataTree_p CreateOutputDataTree(std::map<std::string, vtkAppendPolyData *> &);
void Send(std::map<int, std::vector<BlockIdDatasetPair> > &, const int);
void Receive(std::map<std::string, vtkAppendPolyData *> &);
......
......@@ -488,7 +488,7 @@ VisItInit::GetComponentName(void)
// Purpose: Return integer index of component name in list of all components
//
// ****************************************************************************
const int
int
VisItInit::ComponentNameToID(const char *compName)
{
int n = sizeof(allComponentNames) / sizeof(allComponentNames[0]);
......
......@@ -81,7 +81,7 @@ namespace VisItInit
MISC_API void SetComponentName(const char *);
MISC_API const char * GetExecutableName();
MISC_API const char * GetComponentName();
MISC_API const int ComponentNameToID(const char *);
MISC_API int ComponentNameToID(const char *);
MISC_API const char * ComponentIDToName(const int);
MISC_API bool IsComponent(const char *);
MISC_API void ComponentIssueError(const char *);
......@@ -90,5 +90,3 @@ namespace VisItInit
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment