- Give code a round of indentation. Thank astyle, not me.

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@837 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-09 14:38:45 +00:00
parent aaf8e068d3
commit d3c7b46853
108 changed files with 3196 additions and 3180 deletions

View file

@ -45,11 +45,11 @@ using namespace std;
static CPUPolicy*
find_pol_by_name(const vector<CPUPolicy*>& pols, const Glib::ustring& name)
{
vector<CPUPolicy*>::const_iterator it = pols.begin();
for( ; it != pols.end(); it++)
if((*it)->get_name() == name)
return *it;
return NULL;
vector<CPUPolicy*>::const_iterator it = pols.begin();
for ( ; it != pols.end(); it++)
if ((*it)->get_name() == name)
return *it;
return NULL;
}
@ -58,7 +58,7 @@ main(int argc, char** argv)
{
int successes = 0;
if(argc != 2)
if (argc != 2)
{
std::cout << "[EE] Usage:\n\t" << argv[0] <<
" path/to/uninstalled/test/policies" << std::endl;
@ -72,29 +72,29 @@ main(int argc, char** argv)
PythonCPUPolicyManager polman;
polman.init();
Simulation& sim = Simulation::get_instance();
History& his = sim.get_history();
CPUPoliciesGatekeeper& pgk = CPUPoliciesGatekeeper::get_instance();
Simulation& sim = Simulation::get_instance();
History& his = sim.get_history();
CPUPoliciesGatekeeper& pgk = CPUPoliciesGatekeeper::get_instance();
const std::vector<CPUPolicy*>& policies = polman.get_avail_policies();
const std::vector<CPUPolicy*>& policies = polman.get_avail_policies();
// Print out avail policies
cout << "These are the policies I found:" << endl;
vector<CPUPolicy*>::const_iterator it = policies.begin();
for(; it != policies.end(); it++)
cout << "\t * " << (*it)->get_name() << endl;
// Print out avail policies
cout << "These are the policies I found:" << endl;
vector<CPUPolicy*>::const_iterator it = policies.begin();
for (; it != policies.end(); it++)
cout << "\t * " << (*it)->get_name() << endl;
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_configure");
assert(pol != NULL);
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_configure");
assert(pol != NULL);
// FIXME : Maybe activating a policy only to configure it is an overkill?
// Who gives a fuck about it?
// FIXME : Maybe activating a policy only to configure it is an overkill?
// Who gives a fuck about it?
pgk.activate_policy(&his, pol);
pol->configure();
}
catch(UserInterruptException e)
catch (UserInterruptException e)
{
cout << "configure: Caught UserInterruptException" << endl;
successes++;
@ -103,12 +103,12 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_is_preemptive");
assert(pol != NULL);
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_is_preemptive");
assert(pol != NULL);
pgk.activate_policy(&his, pol);
pol->is_pre_emptive();
}
catch(UserInterruptException e)
catch (UserInterruptException e)
{
cout << "is_preemptive: Caught UserInterruptException" << endl;
successes++;
@ -117,12 +117,12 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
pgk.activate_policy(&his, pol);
pol->get_time_slice();
}
catch(UserInterruptException e)
catch (UserInterruptException e)
{
cout << "get_time_slice: Caught UserInterruptException" << endl;
successes++;
@ -132,12 +132,12 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
pgk.activate_policy(&his, pol);
pol->sort_queue();
}
catch(UserInterruptException e)
catch (UserInterruptException e)
{
cout << "sort_queue: Caught UserInterruptException" << endl;
successes++;