This file is indexed.

/usr/include/osl/effect_action/simpleBetterToPromote.h is in libosl-dev 0.6.0-3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _SIMPLE_BETTER_TO_PROMOTE_MOVE_ACTION_H
#define _SIMPLE_BETTER_TO_PROMOTE_MOVE_ACTION_H

#include "osl/move_action/concept.h"
namespace osl
{
  namespace effect_action
  {
    /**
     * promote可能な場合は promoteしない手は生成しない
     */
    template<class Action>
    class SimpleBetterToPromote
    {
      BOOST_CLASS_REQUIRE(Action,osl::move_action,Concept);
    private:
      Action & ac;
    public:
      SimpleBetterToPromote(Action & a) :ac(a){}
      template<Player P,Ptype Type>
      void doActionPtype(Piece p1,Square to){
	Square from=p1.square();
	Ptype ptype=p1.ptype();
	if(!isPromoted(ptype) && (to.canPromote<P>() || from.canPromote<P>()))
	  ac.simpleMove(from,to,promote(Type),true,P);
	else
	  ac.simpleMove(from,to,ptype,false,P);
      }
      template<Player P>
      void doAction(Piece p1,Square to){
	Square from=p1.square();
	Ptype ptype=p1.ptype();
	if(!isPromoted(ptype) && (to.canPromote<P>() || from.canPromote<P>()))
	  ac.simpleMove(from,to,promote(ptype),true,P);
	else
	  ac.simpleMove(from,to,ptype,false,P);
      }
      bool done() const{ return false;}
    };

  } // namespace effect_action
} // namespace osl
#endif
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: